Non-static method Pager::factory() should not be called statically -


i beginner in php.whenever try implement pager class in pear error

non-static method pager::factory() should not called statically in d:\xampp\htdocs\sam\temp\youtube_playlist.php on line 21

my code

<?php         include("header.php");         include("connect.php");         //connect db video data         $qr = mysql_query("select vid videos",$con);         $data="";         while($row = mysql_fetch_array($qr))         {         $data[]=$row['vid'];         }          //pageing                require('pager/pager.php');         $pg_op= array(         'itemdata'=>$data,         'append' => true,         'perpage' => 3,         'mode' => 'sliding',         'delta' => 2         );         $pager = pager::factory($pg_op);         $pdata = $pager -> getpagedata();         $plinks = $pager -> getlinks();              //display video             foreach ($pdata $vd)             { ?>               <iframe width="510" height="265" src="http://www.youtube.com/embed/<?php echo $vd; ?>" frameborder="0" allowfullscreen></iframe>             <?php                 }                   echo "<br />";                 echo $plinks['all'];                 include("footer.php");             ?> 

please help

i had same issue. pager class seems outdated. if still want use it, suppress error prepending command @

$pager = @pager::factory($pg_op); 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -