pghcollectibles
04-15-2008, 11:01 AM
most of the time in php a variable looks like $me='confused' for example, in this template im editing i have found many occurances of variables with no $ sign including arrays and stuff.
i have found the page where there might be something like:
define('me', 'confused');
and i see me being used in the php coding the same as a variable with a $ with no quotes.
then there are other variables usually i see them in javascript or something that will be var me='confused' or just me='confused' as you can set and declare at same time, but these variable would look different when using php and im not sure how to tell the difference or change syntax if i wanted to.
so $me = me
??? im confused, can you tell.
i might see echo "hello" . $me;
or a function like who_can_help('me')
and i know that me is a variable being used in php but it doesnt have a $ sign. whats the deal. my main help sites talk about each variable syntax within their own language but i dont see anywhere in php that the variable doesnt have a $ sign and i found things in a search for converting javascript variables to php variables but nothing was that actually did it just other people trying to do the same thing.
the only way i know how to convert into php is by using a form and with the POST GET thing or like
<input type="<?php echo $type; ?>" value="">
which isnt even converting (not that i need to) but just using more than one language to output HTML i guess.
Summary:
what syntax is used for variables with no $ sign in php (quotes, no quotes, etc)
whats the difference between the variable dog and the value dog, for example
for the issue of converting i can go from a php variable into a javascript variable:
<script> dog="<?php echo $dog; ?>"; </script>
but how do you make $dog=dog (the variable)
sorry such a long post
i have found the page where there might be something like:
define('me', 'confused');
and i see me being used in the php coding the same as a variable with a $ with no quotes.
then there are other variables usually i see them in javascript or something that will be var me='confused' or just me='confused' as you can set and declare at same time, but these variable would look different when using php and im not sure how to tell the difference or change syntax if i wanted to.
so $me = me
??? im confused, can you tell.
i might see echo "hello" . $me;
or a function like who_can_help('me')
and i know that me is a variable being used in php but it doesnt have a $ sign. whats the deal. my main help sites talk about each variable syntax within their own language but i dont see anywhere in php that the variable doesnt have a $ sign and i found things in a search for converting javascript variables to php variables but nothing was that actually did it just other people trying to do the same thing.
the only way i know how to convert into php is by using a form and with the POST GET thing or like
<input type="<?php echo $type; ?>" value="">
which isnt even converting (not that i need to) but just using more than one language to output HTML i guess.
Summary:
what syntax is used for variables with no $ sign in php (quotes, no quotes, etc)
whats the difference between the variable dog and the value dog, for example
for the issue of converting i can go from a php variable into a javascript variable:
<script> dog="<?php echo $dog; ?>"; </script>
but how do you make $dog=dog (the variable)
sorry such a long post