If you typecast the string to a numeric type somewhere between setting
$result to '1234 - the number', you WILL get the typecasted value, which
would be the integer 1234.

This may explain why you're only getting the number at the beginning of
the string. Now, the question is: is there a typecast? Keep in mind that
a typecast may be hidden - you don't have to explicitly typecast { $var
= (int)$var } to get this effect. It could be implicit with a function
call, etc.

--Toby Butzon

David Robley wrote:
> 
> On Wed,  4 Apr 2001 15:44, Vlad wrote:
> > Hi all
> >
> > script example:
> >
> > function smth(){
> >  $result = '1234 - the number';
> > return $result;
> > }
> > ...
> >   $res = smth();
> > ...
> > After this $res takes value of 1234 not the actual string.
> > Is any soolution here?
> >
> > Thanks, Vlad
> 
> If you do
>  function smth(){
>  $result = '1234 - the number';
>  return $result;
>  }
>   $res = smth();
> echo $res;
> 
> The output is
> 
> 1234 - the number
> 
> What else is in your script?
> 
> --
> David Robley                        | WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> AusEinet                            | http://auseinet.flinders.edu.au/
>             Flinders University, ADELAIDE, SOUTH AUSTRALIA
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to