I recently started coding online and i have the weirdest response, my code is:
?php
include 'function.inc';
echo $idbr;
print (gettype($id));
if ($id = add )
{
echo is add;
exit;
}
if ($id = own )
{
echo id is own;
exit;
}
if ($id = all )
{
echo id is all;
exit;
}
?
$id in
On Sat, 2003-11-22 at 13:57, Pieter wrote:
I recently started coding online and i have the weirdest response, my code is:
?php
include 'function.inc';
echo $idbr;
print (gettype($id));
if ($id = add )
{
echo is add;
exit;
}
if ($id = own )
{
echo id is
Pieter wrote:
I recently started coding online and i have the weirdest response, my code is:
?php
include 'function.inc';
echo $idbr;
print (gettype($id));
if ($id = add )
{
echo is add;
exit;
}
snip
'=' sets value. '==' checks equality.
--- Pieter [EMAIL PROTECTED] wrote:
I recently started coding online and i have the weirdest response,
my code is:
if ($id = add )
When you convert the string add to a boolean, it equates to true.
I'm assuming you want to be using a conditional expression rather than an
assignment
4 matches
Mail list logo