Hi there,
I have the following need:
I have 2 arrays (coming from a databases)
Array2 is related to Array1 -
Example:
Array1
Dog, abc
Cat, bcd
Horse, cde
Array2,
meat, abc
bones, abc
fish, bcd
grain, cde
grass, cde
So, I need the array2 split up into separate arrays - but I am will never know in advance how many rows in both arrays there will be.
Basically, I need to display the data so:
Dog
<ul>
<li>meat</li>
<li>bones</li>
</ul>
Cat
<ul>
<li>fish</li>
</ul>
Horse
<ul>
<li>grain</li>
<li>grass</li>
</ul>
As said, the second array will change very often - but will always have the key from the first array
Any help very much appreciated. I do have it sort of working - but EVERY entry from array2 appears under every entry from array1 :-
here is the code that I have so far written:
Code: <?php
$fquestions = $record->getRelatedSet('Markt.FFragen');
$questions = $record->getRelatedSet('FFragen.Fragen');
foreach( $fquestions as $fquestion ) {
$ffrage = $fquestion->getField('Markt.FFragen::fFrage');
$ffgroup = $fquestion->getField('Markt.FFragen::ffgroup');
$ffrageID = $fquestion->getField('Markt.FFragen::ID');
echo'<h3><a href="#">'.$ffrage.'</a></h3>
<div>
<ul>';
foreach( $questions as $question ) {
$frage = $question->getField('FFragen.Fragen::Frage');
$frageID = $question->getField('FFragen.Fragen::ID');
echo '<li>'.$frage.'<div id="slider"></div></li>';
}
echo '</ul>
</div>';
}
?>
Many thanks in advance
DELETE rows based on content
I have a link in my rows$bit="http://bit.ly/abcd";$query = mysql_query("DELETE FROM *table* WHERE sentence........");//I need to delete all sentence rows which DOES NOT contain my
Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:Code: [General]Online=0I would like it to be in a php file as just 0 if possible. Also how would I do this from php file to php file and let
Change snippet to use CURDATE
I am using time() in the snippet below, I would like to use CURDATE() and have the database setup for date. My problem is, I am not sure how to change the PHP coding, I keep getting errors just adding
Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.a)create an html page to enter a row number (1-6) in a textbox to choose a list of student records.b)
Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...On first.php I have one input field NAME, and on posting the form it moves to "second.php" showing the entered value of input field using $_POST,
Count on multidimensional array
Hi, i got an array as below:Array( => Array ( [2009-12-08] => 1 ) [1] => Array ( [2009-12-07] => 1 ) [2]
import table with dependency
Hi
Count of reciepients in php mailer
How can i sent a mail to large no of reciepients say 10,00,00 Using PHP MAILER
frame help
on the bottom frame is menu.htmlCode: <body><form action='link.php' method='post' name='changer'><label>URL<input type="text"
Basic Question about Threading and PHP...
I have a page that I am working on and it is taking several hours to process. The basics of what the page does is get all the items out of a database then with cURL download some HTML parse through