Jump to content

Array Help


iShaun

Recommended Posts

Ok, i have a database setup like this:

 

Name              | Usergroup  | Value

================================

can:view:cat:1  |  1            |  1

-----------------------------------

can:view:cat:2  |  1            |  1

 

 

what i want to do is be able to do:

 

if($array['can:view:cat:1'] == '1')

{

 

return true;

 

}

 

can PHPFreaks help me?

 

Link to comment
https://forums.phpfreaks.com/topic/124010-array-help/
Share on other sites

Woops, yeah.

 

Always worked for me (when I do it right)

 

What's the better way, I'd be happy to know. (once you solve this guy's problem)

 

Thanks

 

<?php
//assume $result is a successful query resultset resource
while ($row = mysql_fetch_assoc($result)) {
   //use $row in here
}
?>

Link to comment
https://forums.phpfreaks.com/topic/124010-array-help/#findComment-640243
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.