How do I get the number of elements in the second dimension of a two-dimensional array?
I have:
$link["url"][]="http://somewhere";
$link["text"][]="target";
$link["img"][]="./Images/pic.gif";
$link["url"][]="http://somewhereelse";
$link["text"][]="othertarget";
$link["img"][]="./Images/img.gif";
for ($i=0; $i<count($link["url"]); $i++) {
imagelink($link["url"],$link["text"],$link["img"]);
}
When having error_reporting(E_ALL) I get this error:
Warning: Uninitialized string offset: 0 in /usr/local/etc/httpd/htdocs/project/displayfuncs.inc.php on line xy
Where line is the one with the count()-function in it.
Since php seems to dislike the count-function in this context, what should I use then?