[FX.php List] No valid index notice in php
Gareth Evans
gareth.evans at schawk.com
Tue Oct 28 12:59:26 MDT 2008
If (isset($value["Fieldname"][0])) {
echo $value["Fieldname"][0];
}
--
GARETH EVANS
> From: Thomas Neumann <Tomy at Tomy-pa.de>
> Reply-To: <Tomy at Tomy-pa.de>, "FX.php Discussion List"
> <fx.php_list at mail.iviking.org>
> Date: Tue, 28 Oct 2008 19:56:38 +0100
> To: <FX.php_List at mail.iviking.org>
> Subject: [FX.php List] No valid index notice in php
>
> Hi All,
>
> when I'm accessing a FM6 database using FX and the field contains no
> value (never has been set) then I got a
> 'invalid index (0) in line XXX' notice.
> the line is like this echo($value["Fieldname"][0]);
> Now I'm looking for a way to validate the filed before the echo
> instruction. I tried (strLen($value["Fieldname"][0] > 0) but this does
> not work.
>
> An other strange thing is that I got a FX_Erorr Class not found error
> (if an error occurs), but the FX_Error.php file is in the same directory
> as the FX.php file.
>
> As you might notice, I'm new to php, so please be patient with me.
>
> Regards
>
> Tomy
>
> --
> Dipl.- Ing (FH) Thomas Neumann
> Carl-Maria-von-Weber-Str. 26
> D-95448 Bayreuth
> Germany
> Steuernummer 208/254/80340
>
> SATlive http://www.take-sat.de
> SATlive Forum: Http://www.board-4you.de/v18/boards/35
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list