answersLogoWhite

0


Best Answer

Without any function is impossible. So I'll assume you mean any coded function, in which case the predefined function below is your answer.

$string = strrev($string);

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you reverse a string in PHP without using a function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

'c' code to compare two strings using strcmp function?

char one [] = "A string" ;char two [] = "Different String" ;if (strcmp (one, two) == 0){puts ("The two strings are identical") ;}else{puts ("The two strings are different") ;}


How can you check if a variable is a string or an integer in PHP?

Integers - The "is_int()" function can be used to check if a variable is has an integer for its value. ---- is_int($variable); // Returns true if $variable is an integer - otherwise false ---- Numeric Strings - Numeric strings are strings with numbers (or things that count as numbers) in them. Numeric-string variables are not integer variables. Numeric-string variables are passed on through forms, instead of integer variables - if you were wondering. Check form values using string formats, and not integer formats. The "is_numeric()" function can be used to check if a variable is a string with numbers - and only numbers - in it (except things that add up to be numbers). ---- is_numeric($variable); // Returns true if $variable is a string, and only contains numbers (broadly speaking) - false otherwise ---- Strings - String values are just text, basically. String variables can contain integers, but that does not make it an integer-type variable - it makes it a numeric string variable. The "is_string" function can be used to check if a variable contains the value of a string. ---- is_string($variable); // Returns true if $variable is a string - false otherwise


If a mistake is made how does the user make a correction without using the undo function?

You can use the trim key to cut the lines.


What is velocity ratio of a pulley?

The ratio for a simple pulley (not a pulley block), using an inelastic string, is 1.


How do you select a substring from a string using PHP?

In php to select a sub string from a string, use the command: string substr ( string string, int start [, int length]);Simple Examples:

Related questions

Reverse of a string without using string handling function?

shashi


How do you reverse a string with out using strrev?

By writing user defined function.


Concat a string without using any inbuilt function in java?

Use "+". Example: String string = "does this answer " + "your question?";


String reverse program with single string and without using library functions in java?

You can create a separate string initially empty. Then using a loop, start at the end of the string and add it to the end of the other string. At the end of the loop, the other string would contain the reverse.


How do you find the length of string without using strlen function in MySQL?

SELECT char_length (...) FROM ...


Write a Program to convert decimal number into hexadecimal no without using function and string?

This is not a question.


Is it possible to convert a string into integer without using any function in c?

Yes


How To find reverse of string without using strrev function with code?

with a loop. len= strlen (s); p= s; q= s+len-1; while (p<q) { (swap) ++p; --q; }


Piglatin string in c without using pointer?

Sure, you can write a function in C to convert a string to Pig Latin without using pointers by passing the string as a parameter and manipulating it directly within the function. You can split the string into words, check if a word starts with a vowel or consonant, and then apply the appropriate transformation following the rules of Pig Latin. Remember to allocate enough memory for the modified string to prevent buffer overflow.


How do you convert a number that consist of alphabet and number in reverse order?

To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }


Write a program to concate the string without using strconcat function?

If you don't need to preserve the first string you could just iterate over the second string and copy each character onto the end of the first string, then return that


C plus plus code to find the length of a string without using function?

int i = 0; while(str[i] != NULL){ i++; }