Page 1 of 1

what does this PHP code? simple question

Posted: Sat Jan 24, 2009 7:10 pm
by himalaya73
I have the following extract for a PHP program. I'm interested to know what does the line 4. It appears to me that is a concatenation. The query extract phone numbers from a table (i.e. 9999999) but it doesn't make sense to me to substract 0 from the phone number ...

1 $string_sms=OCIParse($cnn,$q_string_sms);
2 OCIExecute($string_sms, OCI_DEFAULT);
3 while (OCIFetch($string_sms)){
4 $telefo=ociresult($string_sms, "TELEFO")-0;

Re: what does this PHP code? simple question

Posted: Sat Jan 24, 2009 7:24 pm
by requinix
It's probably their way of converting a string into a number. Many ways of doing that - subtracting zero is one of them.