0

Reverse and concatenate

You have to design PHP function that take two strings ,first reverse both strings individually then concatenate them. For example - first string is – abcd second string is – efghi after reversing above both string followed by concatenating them the output will look like - dcbaihgfe

6th Jun 2020, 6:31 AM
shreya arora
shreya arora - avatar
5 Answers
+ 5
Prahlad Gaur I understand but how you know she tried? I didn't see her attempts. I am not mind reader.
6th Jun 2020, 6:48 AM
A͢J
A͢J - avatar
+ 4
shreya arora Did you try to do?
6th Jun 2020, 6:33 AM
A͢J
A͢J - avatar
+ 2
<?php function Reverse($str){     return strrev($str); } $str = "sololearn"; echo Reverse($str) ?> output: nraelolos here's how you reverse string in php, now your job is to try to implement your problem using this. // First String $a = 'Hello';    // Second String $b = 'World!'; // Concatenation Of String $c = $a.$b; echo $c output: Hello World! here's how Concatenation is done in php
6th Jun 2020, 6:34 AM
RKK
RKK - avatar
+ 2
Thank you sir... I would try again :)
6th Jun 2020, 6:39 AM
shreya arora
shreya arora - avatar
+ 1
She tried ,but having some mistakes ,so she asked this question, understand aj anant
6th Jun 2020, 6:36 AM
Prahlad Gaur
Prahlad Gaur - avatar