Jump to content

[SOLVED] Easy one, i guess....


Neopyros

Recommended Posts

I have to compare a word, with the value of a position in my array, so far so good but here's my problem:

 

if($file[$i][6] == 'Job="$_POST[slg]"')
echo 'found'; 

 

I can't compare with the value submitted in the previous page plus a content in the document, how should i do it?

 

The person will submit the word for example Test, and i need to compare the position with the value Job="Test"

Link to comment
Share on other sites

errrr....

 

sorry lost me....

 

BUT if you have an array of strings that you want to search for a term then use

 

array_keys($arr,$lookfor); - this will return all teh kesy of the array that match.

 

if $arr us multi dimensional - then put the correct index in ie. $arr['jobtitles'].

 

I didn't really understand your post so if I am way off I apologize but your explanation was IMO bloody awful!!!!

Link to comment
Share on other sites

Ok, let me try again, sorry...

 

I have a multi dimensional array, but i know the position to look for, so i don't want to search the entire array.

BUT, the content is Job="Test". The user will submit only the word Test for the search, i need to compare the position in my array, with Job="$_POST[slg]" but this won't work in php.

 

I guess now it's clear.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.