> hi again! > > I tried it but it desn't give me any result back. > It dosn't print any error message but it desn't print my result either. > > this is how I place the code: > > > echo "...some html code..."; > $row["somename_$var"]; > echo "...the continuation of the html code"; > > thanks!
I think this indice in $row is empty then... try echo (isset($row["somename_$var"] && $row["somename_$var"] !== "") ? $row["somename_$var"] : "Sorry, but \$row[\"somename_$var\"] is not set."); I'll explain, what this code does: it first checks isset($var) - if this variable (or in this case the indice of the array) exists, this is true. so if $row["somename_$var"] exists and is not empty, it does 'echo' the stuff behind the ?, else it does 'echo' the stuff behind the : and please don't set your priority to important on the list - thank you. best regars Stefan Rusterholz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]