Search
 
SCRIPT & CODE EXAMPLE
 

PHP

PHP strrev — Reverse a string

<?php
echo strrev("Hello world!"); // outputs "!dlrow olleH"
?>
Comment

how to reverse a string in php

#Text must be in double quotes in brackets

echo strrev("Text goes here");
Comment

Reverse String PHP

<?php

$a = “abcdeg”;

echo strrev($a);

?>
Comment

how to reverse a string in php

use strrev(); function
Comment

php reverse string

strrev("web learn smart");
Comment

php Write a program to reverse an array or string

<?php
// Iterative PHP program
// to reverse an array
 
/* Function to reverse
$arr from start to end*/
function rvereseArray(&$arr, $start,
                       $end)
{
    while ($start < $end)
    {
        $temp = $arr[$start];
        $arr[$start] = $arr[$end];
        $arr[$end] = $temp;
        $start++;
        $end--;
    }
}    
 
/* Utility function to
   print an array */
function printArray(&$arr, $size)
{
for ($i = 0; $i < $size; $i++)
echo $arr[$i] . " ";
 
echo "
";
}
 
// Driver code
$arr = array(1, 2, 3, 4, 5, 6);
 
// To print original array
printArray($arr, 6);
 
// Function calling
rvereseArray($arr, 0, 5);
 
echo "Reversed array is" ."
";
 
// To print the Reversed array
printArray($arr, 6);
 

?>
Comment

PREVIOUS NEXT
Code Example
Php :: open phpstorm from terminal 
Php :: in php 
Php :: how pass optional route parameter in laravel 
Php :: image laravel 
Php :: php check empty variable 
Php :: generate shortcode wordpress plugin 
Php :: laravel lumen 
Php :: mezzio quick start templating with laminas view 
Php :: php array form 
Php :: acf field without spaces 
Php :: csv import in laravel 
Php :: how many products can a laravel ecommerce handle 
Php :: export laravel path fedora 
Php :: add line in string column export php 
Php :: what is laravel framework 
Php :: php auto reset score 
Php :: pass messages laravel 
Php :: layer order matplotlib 
Php :: confiruando passaport no laravel 
Php :: short isset and not empty php 8 
Php :: random record get with pagination in karavel 8 
Php :: adding array not updating php 
Php :: Script to create AdminLTE in a Laravel project 
Php :: php load select page from url 
Php :: php send sms for aws sns sdk 2 
Php :: change regards line laravel 
Php :: costante php define 
Php :: Type error: Argument 1 passed to IlluminateDatabaseGrammar::parameterize() 
Php :: Ajouter un texte par défaut sur toutes vos publications WordPress 
Php :: laravel save or post 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =