Chrome Extension
+
Add new Snippet
Add new code snippet that you can easily search
Ask Question
If you stuck somewhere or want to start a discussion with dev community
Write Article
Share your knowledge by writing article and spread it
All code snippets
Login
Register
Live Feeds
Code manager
Discussions
Articles
Dev Profile
More
Code snippets
Knowledgebase
About Us
Contact Us
PHP Basics
Variable and data type in PHP
Define constant in PHP
Conditions or if else statement in PHP
Switch case in PHP
For loop php
foreach loop php
Create function in PHP
Date time in PHP
PHP Arrays
Define array PHP
Add item to array PHP
Delete item from array PHP
in_array() PHP
array_chunk() PHP
array_column() PHP
php file operations
Check if file exist in PHP
Create new file and write data to it using PHP
Read file content using PHP
Write data to file using PHP
Delete a file in PHP
or
Create new Snippet
For loop php
php
Share on :
Copy Code
<?php for ($i = 0; $i <= 3; $i++) { echo "Loop counter is : " . $i; } ?>
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Watch Video
Install Now
Output
Loop counter is : 0
Loop counter is : 1
Loop counter is : 2
Loop counter is : 3
Code snippet shows basis for loop used in PHP. We have declared a variable $i and looping 4 times.
Was this helpful?
Yes
No
Created by :
@
Write your Comment
0
Comments
🤔
Similar code snippets
foreach loop php
Convert characters to lowercase using strtolower() function in PHP
Check empty string in PHP
Calculate length of a string using strlen() function in php
nl2br() function in PHP
Return JSON from a PHP script
Install composer for php
One account for all tools and services
Create code snippets
Live developers feeds
Ask questions
Write articles
Post videos and images
Frameworks knowledge base
Get started now
Connect using github
Developer Feeds
Open Code Manager
We are hiring
0 Comments