Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Dear friend i hope you don't get upset with mentioning some basics in php , this answer might view by others, i have seen you other answers and i know you are geek ;) ...</p> <p>$languages is an array, and controllers might send it to your web page with the same order and the order will not change the <code>var_dump($languages);</code> of the array is something like this:</p> <pre><code> array(2) { ["en"]=&amp;gt; array(9) { ["language_id"]=&amp;gt; string(1) "3" ["name"]=&amp;gt; string(7) "English" ["code"]=&amp;gt; string(2) "en" ["locale"]=&amp;gt; string(31) "en_US.UTF-8,en_US,en-gb,english" ["image"]=&amp;gt; string(6) "en.png" ["directory"]=&amp;gt; string(7) "english" ["filename"]=&amp;gt; string(7) "english" ["sort_order"]=&amp;gt; string(1) "0" ["status"]=&amp;gt; string(1) "1" } ["fr"]=&amp;gt; array(9) { ["language_id"]=&amp;gt; string(1) "2" ["name"]=&amp;gt; string(10) "..." ["code"]=&amp;gt; string(2) "..." ["locale"]=&amp;gt; string(31) "..." ["image"]=&amp;gt; string(6) "..." ["directory"]=&amp;gt; string(7) "...." ["filename"]=&amp;gt; string(7) "..." ["sort_order"]=&amp;gt; string(1) "1" ["status"]=&amp;gt; string(1) "1" } } </code></pre> <p>on the other hand, when you click on tabs , the page wouldn't refresh and somehow its not AJAX , so we shouldn't changing our php code.</p> <blockquote> <p>i think you have changed a little in your php code , maybe this code i have written here work for you ...</p> </blockquote> <pre><code>&lt;?php foreach ($languages as $language) { ?&gt; &lt;li&gt;&lt;a href="#language&lt;?php echo $language['language_id']; ?&gt;" data-toggle="tab"&gt;&lt;i class="lang-&lt;?php echo str_replace('.png','', $language['image']); ?&gt;" title="&lt;?php echo $language['name']; ?&gt;"&gt;&lt;/i&gt; &lt;?php echo $language['name']; ?&gt;&lt;/a&gt;&lt;/li&gt; &lt;?php } ?&gt; &lt;/ul&gt; </code></pre> <p>hope the bests , my dear opencarter ... ;)</p>
    singulars
    1. This table or related slice is empty.
    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.
    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