Jump to content

[SOLVED] help understanding a few things


cry of war

Recommended Posts

i have seen some things that look the same and i was wondering what each does what

 

$something="somethingelse"

$something=="somethingelse"

$something==="somethingelse"

$something='somethingelse'

$something=='somethingelse'

$something==='somethingelse'

(!isset($_POST['something']))

(isset($_POST['something']))

 

what does each of these do or what are each used to do? I cant really explain what I am asking anybetter sorry

Link to comment
https://forums.phpfreaks.com/topic/61135-solved-help-understanding-a-few-things/
Share on other sites

$something = "somethingelse" sets the value of the variable $something to the string something else.

$something  = 'somethingelse' is exactly the same

 

if ($something == "somethingelse") is a test for equality - with double or single quotes, it's the same

 

=== is an absolute equality operator: for example the string "0" is not the same as the number 0 with that kind of check

 

isset is looking to see if the variable something has a value POSTed from a form. ! is not

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.