#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    2
    Rep Power
    0
    I am sure this is simple BUT... I have a function such as :-
    function convertnum($value){
    ... convert existing value of $value to something else..;
    return $value;
    }

    and i call it as follows:-
    convertnum($num1)

    convertnum($num2)

    convertnum($num3) ... etc..

    My problem is that the function convertnum takes the value as $value, converts it to whatever (which all works just fine) but I cant get (for example) $num1 to equal the new value after the function has 'worked' on it.

    I hope that I have made sense here.. I also hope that someone can point me in the right direction. I am (as is probably obvious) very new to php.

    Thanks in advance..
  2. #2
  3. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    $num1 = convertnum($num1);
  4. #3
  5. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    yea,,, or

    echo convertnum($num1);

    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited September 13, 2000).]
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    2
    Rep Power
    0
    Thanks very much .. I knew it would be simple :0

Similar Threads

  1. using string functions to take out date
    By pumpkin head in forum Visual Basic Programming
    Replies: 7
    Last Post: November 9th, 2004, 10:50 AM
  2. simple: returning values from functions
    By bluetooth20 in forum PHP Development
    Replies: 2
    Last Post: February 8th, 2004, 08:48 PM
  3. array explode ( string separator, string string [, int limit])
    By beemee_freeserv in forum HTML Programming
    Replies: 4
    Last Post: February 5th, 2004, 11:56 AM
  4. Zip code validation
    By krwyth in forum MySQL Help
    Replies: 2
    Last Post: January 5th, 2004, 02:29 PM
  5. Getting std functions to use my string class.
    By movEAX_444 in forum C Programming
    Replies: 3
    Last Post: December 30th, 2003, 06:57 PM

IMN logo majestic logo threadwatch logo seochat tools logo