answersLogoWhite

0

"Text move" isn't very clear. If you want to assign strings to different variables, use the assignment operator: <?php

$old_var = 'blah';

$new_var = $old_var;

echo $new_var; // Displays "blah"

?>

If you want to work with a certain part of a string, use substr(): <?php

$part_of_string = substr($string, $start, $length);

// $start should be an integer, indicating which character to start obtaining the string at

// $length should be an integer, indicating how many characters you want to obtain.

echo = substr('somesimplestring', 5, 6); // Displays "simple"

?>

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is the function die used for in PHP?

The function die() stops the script from running. See the example below: &lt;?php die("this text will be outputted on the page"); echo "this text will not be shown due to the script ending when the die() function was called"; ?&gt;


How do you separate word in array using php?

To separate a sentence into an array of words, you can use PHP's explode() function. If $text is your sentence, then use the following: $result = explode(" ", $text);


Is php a binary file?

No, PHP is text file with .php extension.


What is a regular expression in PHP?

echo or print &lt; both of which write text: &lt;?php echo "TEXT"; print "TEXT"; ?&gt;


What is a PHP file?

A PHP file is a text file containing code to be run on a webserver by a program called php. It's the most used dynamic page script engine as it is free and open source.Use the fopen() function to open files in PHP. The first parameter of this function is the file to be opened and the second parameter specifies in which mode the file should be opened


What are php functions?

A function is a set of commands. These commands usually call other, more basic functions and called one after the other they work together to archive a certain objective, sometimes simple, sometimes complex. Say the purpose of the function is to erase all hyphen (-) and at (@) characters in some text. The function will is accept a parameter (the text) and return a value (the formatted text). Here's how that would look in the code... function strip_slashes ($text) { return str_replace(".", "", str_replace("@", "", $text)); } This code creates a function called "strip_slashes", the function accepts the "$text" parameter and then runs the built in PHP function "str_replace" twice to replace the @ and - characters with nothing (effectively erasing them). In the same line we tell our function to "return" the results of our two "str_replace" functions. PHP has over 700 built in functions able to do just about anything you can think of. If it's not there, likely because it's very specific to your application, then you can simple write it yourself.


What program can read php file?

PHP files are plain text, so you can read them with your text editor or IDE of choice.


How does PHP function in applications?

in php used for one typ website


How do you use settime out in php?

we cant use set timeout function in php because it is of java script function


How do you return a value in a PHP function?

Below is a simple example of how you could return a value in a PHP function. &lt;?php function returnme($value) { return $value; } echo returnme('hello'); // outputs: hello ?&gt;


What is the way to create a function in PHP?

function function_name() { .................... }


How do you create a text editor in PHP?

Well it got nothing to do with PHP, you going to need JavaScript to do that :)