View Single Post
Old 10-14-2016, 10:39 AM  
Andreweb
Confirmed User
 
Andreweb's Avatar
 
Industry Role:
Join Date: Mar 2013
Location: Internet
Posts: 2,425
Simple question to php gurus about pagination

My php skills are very limited (I'm still learning) ! So there's a chance to paginate this thing ?

Code:
<?php
$xml = simplexml_load_file("camsx.xml");
foreach($xml->children() as $child){
    $gal[$child->getname()] = $child[0];
    
    foreach($child as $ch){
        $gal[$ch->getname()] = $ch[0];
    
    }
    if($gal['sex']=="Female" && $n < 1000 && $gal['showmode'] == "free"){
    ?><div id="grid">	<div class="host_box">
    <a href="/<? echo $gal['screenname']; ?>" target="_self" "><img src="<? echo $gal['liveimage']; ?>" alt="<? echo $gal['screenname']; ?>"><br>
    <? echo $gal['screenname']; ?></a>
    </div>
    <?php
    $n++;
    }
}
?></div>
It's just a way I found to parse cams from a XML feed and works just fine but I want to paginate that if is possible any help will be appreciated ! Thanks in advance !
__________________
Make Money With: Chaturbate
Andreweb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote