Jump to content

[SOLVED] language comparison reference


scottybwoy

Recommended Posts

actually javascript and php are very similar in syntax so having having a manual on the different functions wouldnt be that much of value. there are some slight differences.

i think the isset($var) you can simply replace with

if(jsVar!=undefined){}

//or
if(jsVar!=null){}

 

I can't point you to a differences list, but as to your example, I've seen checking for set variables two ways:

 

if(someVar) //I see this one from time to time....  Only problem is that I don't know if it's technically
//ok to do this.  Some how I don't think it is.  Also, what if the variable is set, but it's false.... lol

//and:

if(typeof someVar == 'undefined') //I think this might be the right way.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.