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 :: PHP is not configured to connect to MySQL 
Php :: doble quotes in csv export php 
Php :: scirvere su file php 
Php :: conditional validation laravel based on role 
Php :: user order by role spatie laravel 
Php :: laravel update only changed fields 
Php :: unnamed place placeholders pdo 
Php :: adjacent post sort order by post title 
Php :: pest check url status 
Php :: php pass 2 date value to javascript 
Php :: convert_uuencode (PHP 5, PHP 7, PHP 8) convert_uuencode — Uuencode a string 
Php :: laravel @class 
Php :: get search query wordpress dev 
Php :: php pagination ellipsis 
Php :: "IlluminateDatabaseEloquentMassAssignmentException" 
Php :: laravel return from db reorder 
Php :: phpmailer 
Php :: php call non static method from static method 
Php :: php get file from another server 
Php :: php remove everything before colon 
Php :: php heredoc function 
Php :: How to get a list of registered route paths in Laravel? 
Php :: paginate array before more results php 
Php :: php get api 
Php :: change apply coupon text woocommerce 
Php :: php header author 
Php :: Uncaught RedisException: Redis server went away in 
Php :: return single row from eloquent all collection laravel 
Php :: wordpress run php code in page 
Php :: cases_sensitive 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =