array_slice

$input = array(“red”, “green”, “blue”, “yellow”); $splice1=array_splice($input, 1, count($input), “orange”); $splice2=array_splice($input, 1, count($input)-1, “mango”); print_r($splice1); echo ”; print_r($splice2);

PHP Array Pagination

$path=getcwd().”\images”; if(is_dir($path)){ $arrayPhotos=array(); if ($dh = opendir($path)) { while (($file = readdir($dh)) !== false) { if($file!=”..” && $file!=”.” && strtolower($file)!=”thumbs.db”) if(!in_array($file,$arrayPhotos)) array_push($arrayPhotos,$file); } closedir($dh); } } asort($arrayPhotos); // Include the pagination class include ‘pagination.class.php’; // Create the pagination object $pagination = new pagination; // If we have an array with […]

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top