Very short and simple example:
<?php
$text = "Hello World";
$i=0;
while ($i<strlen($text)) {
echo substr($text,$i,1);
$i+=2;
}
?>
More Related Contents:
- Deleting an element from an array in PHP
- Transposing multidimensional arrays in PHP
- How do you reindex an array in PHP but with indexes starting from 1?
- Turning multidimensional array into one-dimensional array [duplicate]
- Upload Photo To Album with Facebook’s Graph API
- What does it mean to escape a string?
- Manipulate a string that is 30 million characters long
- Notice: Trying to get property of non-object error
- SOAP-ERROR: Parsing WSDL: Couldn’t load from – but works on WAMP
- Are PHP functions case sensitive?
- How to setup mail in XAMPP locally?
- Extension gd is missing from your system – laravel composer Update
- Creating a PHP header/footer
- What is your preferred php deployment strategy? [closed]
- PHP – get base64 img string decode and save as jpg (resulting empty image )
- PHP function ssh2_connect is not working
- How do I sanitize input with PDO?
- How to select all column name from a table in laravel?
- mysql_connect(): No connection could be made because the target machine actively refused it
- PHP post_max_size overrides upload_max_filesize
- print_r() adds properties to DateTime objects [duplicate]
- Returning first x items from array
- Using Template on PHP
- How the usort() sorting algorithm works?
- Explode a paragraph into sentences in PHP
- How to setup Docker + PhpStorm + xdebug on Ubuntu 16.04
- display only 3 foreach result per row
- Lucene with PHP
- Routes in Codeigniter – Automatically
- Unset a row in a multidimensional array