Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php get first element of iterator class

$first = $iterator->current();

// remember to rewind it after a foreach
foreach($iterator as $it)
{ /* ... */ }
$iterator->rewind();
$first = $iterator->current();
Comment

PREVIOUS NEXT
Code Example
Php :: acf looping through post types 
Php :: model class not found in laravel 
Php :: smarty switch case 
Php :: add key value array php 
Php :: Gravity Form Shortcode Wordpress 
Php :: laravel copy image with new name 
Php :: login page in php 
Php :: how to save and get checkbox value in database php 
Php :: php replace string 
Php :: construct php 
Php :: array_chunk in php 
Php :: remove invalid characters from a string laravel 
Php :: codeigniter sanitize input field 
Php :: wordpress get post date custom format 
Php :: $ is not define 
Php :: Laravel query where and 
Php :: database, counts,php, 
Php :: laravel manually authenticate user 
Php :: how to determine if file is empty in php 
Php :: laravel collection to array 
Php :: check if custom post type exists 
Php :: laravel sanctum Provoking tokens 
Php :: php sort by key 
Php :: php number multiple of 
Php :: how to get value in to radio button php 
Php :: laravel migration change column order 
Php :: PHP - json_encode() 
Php :: joomla print query 
Php :: no routes.php in http folder 
Php :: get posts with multiple meta value in wordpress 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =