what does this PHP code? simple question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
himalaya73
Forum Newbie
Posts: 2
Joined: Sat Jan 24, 2009 7:05 pm

what does this PHP code? simple question

Post 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;
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: what does this PHP code? simple question

Post 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.
Post Reply