php - Showing content in tabs but using different content -


so i'm trying create page using tabs. clicking on tab needs show page tab linked ( #tab1 --> tab). got 28 links , name's id ( cat1 --> 0 | cat2 --> 1 etc) clicking on 1 of them opens them , auto include's page ( 'http://services.runescape.com/m=itemdb_rs/api/catalogue/items.json?category='.$cats[0].'&alpha=a&page=1' ) cats[0] cat id sended option menu. because i'm using tab system have no idea how open tab , sending id page , sending tab opened , showing data.

tl;dr?

click on tab --> sending id external page --> returning data --> posting data tab opened.

second part

now second part. when data received , posted see 5 results letter "a" there bar above tab content of z. when in tab cat1 can click on b , shows same tab result letter b.

enter image description here

currently looks like. clicking on "construction" should open tab construction grabbing data page. , clicking on second letter (should b in future) opens same tab items starting b.

currently script using on external page

    <?php if(!function_exists("curl_init")) die("curl extension not installed");  $url = 'http://services.runescape.com/m=itemdb_rs/api/catalogue/items.json?category='.$cats[0].'&alpha=a&page=1';   $ch=curl_init($url); curl_setopt($ch, curlopt_returntransfer, true); $r=curl_exec($ch); curl_close($ch);  $arr = json_decode($r,true); echo "<table>"; foreach($arr['items'] $val) {     echo '<tr>';     echo '<td>'.$val['id'].'</td>';     echo '<td>'. htmlspecialchars($val['type']) .'</td>';     echo '<td>'. htmlspecialchars($val['name']) .'</td>';     echo '<td><img src='. $val['icon'].'></td>';      echo '<td>'. htmlspecialchars($val['current']['price']) .'</td></tr>';       } echo "</table>";  ?> 

it may little weird question tried best explain clear possible. hope me little further because have no idea how works. think has jquery experience zero.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -