php - Fetch specific field from a MySQL result array -


I am trying to retrieve the field media_file from the first row of the query. I do not know how to do it

I am trying to try first, multidimensional array $ pages [0] ['media_file'] has tried several times to get it. The image of a series is large and then connect to the other thumb. Here is the page that we are talking about:

This code is:

  function createExhibit () {$ OBJ = & amp; get Instance(); Global $ rs; $ Pages = $ OBJ- & gt; DB- & gt; Fetch Array ("SELECT * FROM" .PX. "Media," .PX. "Objects_prefs" Where media_ref_id = '$ rs [id]' and obj_ref_type = 'exhibit' and obj_ref_type = media_ob_type media_order asc, media_id asc ") ; $ S = "& lt; Div id = 'text-container' & gt; \ N "; $ S = $ rs ['Content']; $ S. =" & Lt; / Div & gt; \ N "; $ S. =" \ N & lt; Div class = 'cl' & gt; & Lt ;! - - & gt; & Lt; / Div & gt; $$ ($ $ pages) as the $ {$ height = getimagesize (DIRNAME .GIMGS. "/ Th- $ height [Media_file]"); $ Find_smallest_height [ ] = $ Height [1];} sort ($ search_lory_height_HIGHT, SORT_NUMERIC); rsort ($ find_smallest_height); $ min = array_pop ($ find_smallest_height); $ I = 1; $ A = ''; foreign currency ($ page $ go) ) {$ A. = "\ N & lt; A class = 'group' rel = 'group' href = '". BASEURL GIMGS" / $ Go [media_file]' title = '$ go [media_title]' & gt; & Lt; ImgXXX src = '". BASEURL GIMGS" / Th- $ go [media_file]' alt = '$ go [media_caption]' height = '80px' / & gt; & Lt; / A & gt; \ N "; $ I ++;} // images $ s. =" & Lt; Div id = 'img-container' & gt; \ N "; // //////////////// I'm here for QUERY $ s =" & lt; ImgXXX src = ''. BASEURL GIMGS $ pages ['media_file']. "'Alt =' $ pages [media_title] '/ & gt;" // THUMB FORMAT $ s = $ a; $ S. = "& Lt; / Div & gt; Thank you in advance!   

You can set your $ height [' Media_file '] Dual-quoted strings inside variables like. You can use either with curly braces:

  "/ th - {$ height [' media_file ']} "/ Th - $ {height ['media_file']}" or  Height ['media_file']  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -