Note that there are some explanatory texts on larger screens.

plurals
  1. POuse different string in function?
    primarykey
    data
    text
    <p>I am a total NOOB in programming (but this is only my second question on stackoverflow :-) ).</p> <p>By a foreach function I get 5 different string values for $Loncoord, $Latcoord, $gui; this I can see with the <code>print_r</code> in the code written below:</p> <pre><code>"-5.68166666667","+24.6513888889","IMG_3308", </code></pre> <p>But I now want to create 5 different markers in the $map->addMarkerByCoords (function is it ?).</p> <pre><code>print_r ("$Loncoord"); print_r ("$Latcoord"); print_r ("$gui"); $map-&gt;addMarkerByCoords("$Loncoord","$Latcoord","$gui",'OldChicago'); </code></pre> <p>Is this possible?</p> <p>Do I need to put them in a array and call these in the (function ?) or do I need to use a foreach function? I tried both for a week now but I can't get it working.</p> <p>Can you help me?</p> <p>The answers you produced gave me a turn in the right direction. Thank you for the quick responses and the explaining part.</p> <p>But for the addMarkerByCoord (function! (stupid me)) I found this in the googlemaps API:</p> <pre><code>function addMarkerByCoords($lon,$lat,$title = '',$html = '',$tooltip = '') { $_marker['lon'] = $lon; $_marker['lat'] = $lat; $_marker['html'] = (is_array($html) || strlen($html) &gt; 0) ? $html : $title; $_marker['title'] = $title; $_marker['tooltip'] = $tooltip; $this-&gt;_markers[] = $_marker; $this-&gt;adjustCenterCoords($_marker['lon'],$_marker['lat']); // return index of marker return count($this-&gt;_markers) - 1; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload