This may sound like a silly question and I'm not thinking hard enough,
Or its harder than i think...
Say i have a array of numbers like:
$table = array(
'5','2','1','4','4','4',
'1','2','4','2','1','1',
'3','4','3','1','4','4',
'1','4','2','S','4','4',
'1','2','4','2','1','1',
'5','2','6','4','8','1'
);
S = where I want to get either the row or column based on where "S" is.
I know i can get where S is.
by doing:
$start = array_search('S', $table);
The ''grid'' this array is based on,The S can can be anywhere.
And the grid itself can be different sizes length and width.
How would i go about getting the whole row or column.?
(IE:S is in column 3 : 4,2,1,S,2,4)
(IE:S is in row 3 : 1,4,2,S,4,4)
Just a hint in the right direction would be helpful, Don't need to go all out for me.
Or a idea on how to approach this.