The answer to this may be right under my nose, but to save me, I can't seem to see it. I currently have a one dimensional array which I would like to expand into a 2d array.
$warArray = 'Blah0', NULL;
$warArray = 'Blah1', NULL;
$warArray = 'Blah2', 'Data';
For the life of me, I can't figure out how to loop through the $warArray using the 1st dim, and return the 2nd dim if the 2nd dim's value isn't a null string.
Hopefully this makes sense. Been kicking the code so long I don't think it will, though.
for ( $x = 0; $x < $maxArrayLength; $x++ )
if ( $warArray[$x]->[2ndDimension] != NULL )
I don't think I'm using the NULL comparison correctly, but it's the closest thing to a C equivalant I can think of. If string-> is 0x0. I'm pretty sure the pointer reference isn't valid, either, but again, it's the closest thing I can think of. I'm trying to find if the 2nd dimension contains actual data so it can be printed.
Someone once told me PHP was a lot like C, to which I responded hey, it should be easy to learn!