Jump to content

[SOLVED] array with variable


unxposed

Recommended Posts

Okay this is almost certainly a stupid question as I'm probably going about it the wrong way, but it mightgive you an idea of what I'm trying to achieve, any ideas? thanks!

 

	$test = array(
	array(15, 1),
	array(18, 1),
	array(97, 2),
	array(100, 2),
	array(103, 3),
);

if ($test[$a][0] == 15) {
	echo $test[$a][1];
}

Link to comment
https://forums.phpfreaks.com/topic/123396-solved-array-with-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.