En réponse à Mantas Kriauciunas <[EMAIL PROTECTED]>: Hi You use = instead of == So, the first condition is always true
Regards Julien > Hello John, > > Friday, July 19, 2002, 12:25:12 AM, you wrote: > > JW> Any ideas on why this won't work? It will only > include("inc/entrance.php") > JW> It never, no matter what the value of $mode, displays > collection.php. > > thinking logicaly: > > JW> <?php > JW> $mode = "entrance"; $mode is "entrance" > JW> if ($mode = "entrance") { looks if mode is > "entrance" which is > JW> include("inc/entrance.php"); if was true so it > includes entrance > JW> } > JW> else if ($mode = "collection") { looking again if for > same $mode if it is "collection" but it was in first line "entrance" > JW> include("inc/collection.php"); if was false it never > executes this part! > JW> } > > JW> ?> > > so what are you trying to get? both included? > if yes this will include both: > > <?php > $mode = "entrance"; > if ($mode = "entrance") { > include("inc/entrance.php"); > } > $mode = "collection"; > if ($mode = "collection") { > include("inc/collection.php"); > } > > ?> > > > sorry if i didn't understood the question! > > -- > Best regards, > Mantas mailto:[EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php