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
Keeping data in form
How can I keep whatever I write in the form?
An odd assignment statement. Can someone explain this assignment to me?
What purpose is served by the bit of code between the two equal signs in the $installurl set? Is this some sneaky way of setting $baseurl? I remember the code seemed to blow up when I took it
please help me... my password gets encrypted but not able to get in database
hai guys, please help me... in the following function my password gets encrypted but not able to get in database.is any error in the query please help me...... <?php $email =
mail() says sent but no email received
My code is quite simple:Code: <?php$to = "Ty44ler@yahoo.com";$subject = "Test mail";$message = "Hey, I just wanted to see if the script worked.";$from =
Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.So this would write 2232 as the cookie for ID.http://www.example.com/redirect.php?ID=2232Ultimately, I'm working on a pixel tracking
ALV List Display to point to another report on Double Click
Hi,
Oracle11g Patch issue
Hi all,I'm getting the following error while installing Oracle11g Patch 11.1.0.7.0 on IBM-AIX/oracle/Disk1/stage/Components/oracle.owb.rsf/11.1.0.7.0/1/Datafiles/filegroup16.jar.when I look into the
PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in. Moderators: Please excuse me if this is in the wrong category.The problem is that I am assigned with the task of
login page does not execute a else statement
I've created a login page using sessions.When an incorrect user name or password is entered then a custom messege error message apears.But if a correct user name and password is used then notthing
mysql_affected_rows() usage
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP function.Seems as though mysql_affected_rows() is not returning the desired number so I can move into my