954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Searching within arrays problem

Hi People,

First of all I would like to appologize if this has been posted before but I have not been able to find the answer.

The Problem

Basically what I'm trying to do is create a page that lists all assets from an assets table and disables the check box for the ones that have been patched (which the records are held in a comma seperated column called asset_tags in the patching table). This is where it gets complicated I have two assoc arrays and I want to search the assets tables with values from the patching table and the assets that have been patched should have a checkbox disabled and the ones that haven't been patched to show that check box enabled.

Any help or point in the right direction would be greatly appreciated, my humble a kindest regards.

mus

bigmushy
Newbie Poster
2 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

Are you using database? If so, in the output, arrange the data (both asset name and situation - patched or not) into a single array. For example: [php]$data = $row['asset_name']." - ".$row['situation']."\n";[/php]When displaying the reseult, use explode fuction to separate the asset_name to the situation. I hope this help.

zippee
Posting Whiz in Training
294 posts since Jan 2005
Reputation Points: 10
Solved Threads: 7
 

Hi Zippee,

Are you using database? If so, in the output, arrange the data (both asset name and situation - patched or not) into a single array. For example: [php]$data = $row['asset_name']." - ".$row['situation']."\n";[/php]When displaying the reseult, use explode fuction to separate the asset_name to the situation. I hope this help.


Thanks for your reply I am using a database and have managed to find a way round this as you have described, once again thank you very much dude. :)

bigmushy
Newbie Poster
2 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You