User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,700 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,172 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 912 | Replies: 2
Reply
Join Date: Sep 2006
Location: West Yorkshire
Posts: 2
Reputation: bigmushy is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bigmushy bigmushy is offline Offline
Newbie Poster

Help Searching within arrays problem

  #1  
Sep 25th, 2006
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

Re: Searching within arrays problem

  #2  
Sep 26th, 2006
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.
Last edited by zippee : Sep 26th, 2006 at 5:09 pm.
Ecommerce-Web-Store.com Building Your e-Business.
Reply With Quote  
Join Date: Sep 2006
Location: West Yorkshire
Posts: 2
Reputation: bigmushy is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bigmushy bigmushy is offline Offline
Newbie Poster

Re: Searching within arrays problem

  #3  
Sep 27th, 2006
Hi Zippee,

Originally Posted by zippee View Post
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 2:43 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC