View Full Version : if many question?
nikomou
03-16-2007, 10:26 PM
Is this possible?
If this1 = 0
and this2 =0
and this3 =0
then this0 =hello
Cheers!
boxxertrumps
03-16-2007, 10:31 PM
$this = array();
if (($this[1] == "0") && ($this[2] == "0") && ($this[3] == "0")) {
$this[0] = "hello";
}
EDIT: Didnt know that...
djr33
03-16-2007, 11:39 PM
You're missing a semicolon--
$this["0"] = "hello";
Additionally, for numeric arrays, you don't need to have quotes around the number.
Just $this[0] would be fine.
nikomou
03-17-2007, 10:02 AM
thank you both very much!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.