Below is the action.class.php code for the success page named playlistSuccess.php,
here i am getting the values of mob0,mob1 etc., to mob7 from the address bar of browser that is we
are using the get method.The browser address bar contains something like this
http://localhost/frontend_dev.php/playlist/playlist?mob0=8761&mob1=8763&mob2=8764&mob3=8765&mob4=8773&mob5=8774&=8775&mob7=8901 From the code below i am getting all the values from the browser address bar and all of them are inserted in to an array named DATA.Then using FOREACH i just extracted the values and using the criteria i connected the database to the field name FILE where ID is the value that i get from the DATA array.The OUT variable has all the values we want and from that using FOREACH i once again extracted the correct values of each array in to MYDATA.This MYDATA has values of different fields of the TABLE FILE.
Then all the data that i want is now in the RESULTARRAY.
public function executePlaylist()
{
$this->a =$this->getRequestParameter('mob0');
$this->b =$this->getRequestParameter('mob1');
$this->c =$this->getRequestParameter('mob2');
$this->d =$this->getRequestParameter('mob3');
$this->e =$this->getRequestParameter('mob4');
$this->f =$this->getRequestParameter('mob5');
$this->g =$this->getRequestParameter('mob6');
$this->h =$this->getRequestParameter('mob7');
$data=array("$this->a", "$this->b", "$this->c", "$this->d", "$this->e" , "$this->f" ,"$this->g" , "$this->h");
$resultArray = array();
//print_r($data);
foreach($data as $val)
{
$cr = new Criteria();
$cr->add(FilePeer::ID,$val);
$this->out = FilePeer::doSelect($cr);
//another criteria
//echo $val;
foreach($this->out as $mydata){
// echo '<br />'.$mydata->getUserid();
// echo '<br />'.$mydata->getId();
//echo '<br />'.$mydata->getOrginalpath();
//echo '<br />'.$mydata->getCaption();
$resultArray[]=array( $mydata->getUserid(), $mydata->getId(), $mydata->getOrginalpath(), $mydata->getCaption(), $mydata->getDate());
}
}
$this->resultArray = $resultArray;
}
In the playlistSuccess.php page i am just outputting an XML file which i want to connect dynamically to my AUDIO PLAYER(THIS IS MY REQUIREMENT YOU CAN OUTPUT TO ANY XML FORMAT YOU WANT).
< ?php
echo '<?xml version=\"1.0\" encoding=\"UTF-8\" ?><songs>';foreach ($resultArray as $result){
$id = $result[0];
$mainid = $result[1];$title = $result[2];
$author = $result[3];
$date =$result[4];
$comma= '"';
echo "<song path=".$comma."$title".$comma. " bild=".$comma."http://s3.amazonaws.com/tutorialz/100×100/$id".$comma." artist=".$comma."$id".$comma." title=".$comma." $author".$comma."/>\r\n";
}
echo "</songs>";
?>
Incoming search terms:
- symfony interview questions and answers (4)
- symfony get method (3)
- methode get symfony (2)
- getting data from page symfony (2)
- to run jsp file what apache handlers add in cpanel (2)
- symfony get a array variable on view (1)
- symfony array manipulation (1)
- symfony array get method (1)
- symfony get from array where (1)
- symfony get methoed name (1)
- symfony GET pass array (1)
- symfony get request parameter as array (1)
- array manipulation interview questions php (1)
- symfony get value array (1)
- symfony getmethod (1)
- symfony getRequestParameter for array (1)
- symfony How to get into an array of the page (1)
- symfony result in array (1)
- symfony submit array get method (1)
- symfony xml file manipulator (1)
- retrieve values from array in symfony (1)
- php detect if browser is firefox (1)
- array(method => symfony (1)
- arrays in symfony 1 0 (1)
- get array values in symfony (1)
- get method for symfony (1)
- get() method in symfony (1)
- getmethod en symfony (1)
- getMethod() in symfony (1)
- getRequestParameter dropdown (1)
- getRequestParameter in model symfony (1)
- google interview questions on array manipulations (1)
- how to get array in $this->getRequestParameter in symfony (1)
- how to grab blob image from db symfony (1)
- interview questions and answers for symfony (1)
- javascript onkeypress search database (1)
- Mysql Database driven jQuery fade slide show with php (1)
- mysql innodb fulltext search (1)
- onexit input jquery (1)
- video tutorial symfony (1)
You will also be interested in ,
- Javascript setTimeout() Tricks
- Simple Javascript Slideshow
- Caching of images using javascript image object
- Display Tags in wordpress
- .htaccess some facts and rules
- Url rewriting examples using .htaccess
- To Remove An Empty Element From An Array Using PHP
- Displaying or changing images each day
- C sharp INTERVIEW QUESTIONS
- ScriptAlias and Alias in httpd.conf at a glance
