Programming › Re: I Want To Learn Programming. Which Language Should I Start With? by Hackgeek: 12:05pm On Jan 07, 2017 |
ChinenyeN: According to the PHP manual (I assume this is PHP), things that will evaluate as FALSE in conditions are (in no particular order):
1. The number 0 and 0.0. 2. Empty strings and empty arrays. 3. The string "0". 4. NULL and unset variables. 5. SimpleXML objects created from empty tags.
So, provided that, in your script, $phone carries any of the above values, then your first IF condition would evaluate as TRUE. This is because options 1 ... 5 convert to FALSE, and !FALSE == TRUE.
The same goes for the function in the first ELSEIF statement. That ELSEIF statement will always evaluate to TRUE, provided that function returns any of the values in 1 ... 5.
So, you have to ask yourself what value exactly is your $phone variable actually carrying, and what value is the validate_phone function actually returning. Very good point indeed...I think you should start debugging from th point you declared your $phone variable....little typos in code can sometimes be quite hard to locate..or you can upload the full code here let's see...good luck coding! |
Programming › Re: I Want To Learn Programming. Which Language Should I Start With? by Hackgeek: 11:56am On Jan 07, 2017 |
Brandon93: Pls guys, I'm in real need of a java programmer who can personally teach me java programming from d scratch.. i really don't wish to attend dose schools and all that, just need someone who does it and can put me thru. Pls help with ideas as its urgent... thanks in advance If you stay in Benin City, let's chat...otherwise it's possible to learn on your own and ask someone who's more experienced anytime you have questions...all you really need is dedication... |
Programming › Re: I Want To Learn Programming. Which Language Should I Start With? by Hackgeek: 12:04pm On Jan 01, 2017 |
eprince21: pls,if u av any material on programming,send it to me email eprince2020@gmail.com What language are u interested in and how deep have you gone already? |
|
|
|