answersLogoWhite

0

How does PHP explode work?

User Avatar

Anonymous

12y ago
Updated: 8/17/2019

Explode function splits a string into an array.

For example:

$str="Hello, How are you? i am fine.";

explode("?",$str,2);

it outputs two values in an array by splitting string into two values. Before question mark is considered as first value to array and after question mark is considered as second value.

Finally, Array contains two values when you print it using print_r( ) function.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

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);


Where can one find information about a PHP Split?

You can find information about the PHP split function in the official PHP documentation on php.net. This function was deprecated in PHP 5.3.0 and removed in PHP 7.0.0, so it is recommended to use explode() or preg_split() instead.


Does TCS use php?

All big companies work in PHP. It is a growing technology.....


If you drop a TV will it explode?

No it will not explode. It will just not work anymore


How do you count the vowels in a string using PHP?

build an array of vowels then do a foreach on the array and then explode the string on the array value and the answer is -1 of the result


How can you put PHP into your product details pages?

<?php // your php code goes here ?> If your product pages are created in PHP (have the .php extension) then you can simply add the php start/end tag. There is a way to have the server recognize PHP inside of HTML files but that would require some work on the server, better left to the server manager.


Does No Explode work?

We should try "no explode". Sounds like a good idea to me.


What is a good server for PHP language?

The best server yet for php serving is Apache, as PHP and Apache work closely together. The MySQL community database is a good server for PHP applications, this is why we talk about w/xamp servers, Windows/Linux Apache MySQL PHP servers.


How can one become employed in a PHP job?

While it may be a bit harder to find a company to work for, you could always check your local listings on sites such as Monster. Another way is to become a freelance PHP programmer, taking up opportunities as they come. If you are hard pressed to find work, then check sites where people are asking for PHP work done, such as the website PHP Jobs.


Where can freelance PHP work be found?

There are many websites that you can go to in order to find freelance PHP work. Some of the more popular sites include Peopleperhour, Freelancer and Teams4hire.


How does PHP work?

PHP is a programming language that stands for PHP Hypetextual Processing (recursive acronym). Technically PHP is just a program that lives on your computer which interprets code and executes PHP statements line by line. The PHP interpreter will execute changes to your computer or run-time environment based on the low-level instructions that the programmer issues.


What is syntax in php?

We can use php tags in different ways. <?php //php code to be written here ?> OR <? //php code ?> This tag will not work when we using editors such as macromedia dreamweaver. OR < script language="php"> //php code </script>