Re: Differences in arrays

From: Date: Thu, 02 Dec 2004 11:44:50 +0000
Subject: Re: Differences in arrays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-203332@lists.php.net to get a copy of this message
--- Mike Smith <mikeosmith@gmail.com> wrote: > How about: > > > if ( is_array($_SESSION['schools'] ) ) { > foreach($_SESSION['schools'] as $h) { > If($h!=""){ //First added line > $query = "INSERT INTO Prof_Schools (ProfID, School) > VALUES ('$LID', '$h')"; > $res6 = run_query($query); > echo $query; > } //End added line > } > } Yes, I did that and it works correctly now. I was tryin g to better understand why the difference in the behaviour. Stuart

« previous php.general (#203332) next »