Search
 
SCRIPT & CODE EXAMPLE
 

PHP

preg_split in php

$str = "a. Hello my name is xxx.
b. Hello is my name yyy?
c. Hello my name is rrr!
d. Hello my name is aaa";
$res = preg_split("/
[a-z].s/", "
" . $str);
array_shift($res);
print_r($res);

output

Hello my name is xxx.
Hello is my name yyy?
Hello my name is rrr!
Hello my name is aaa
Comment

split php

<?php

	$polygon = "monogon, digon, trigon, tetragon, pentagon"
	#Now, I want to separate these polygon names
	$separated = explode(", ", $polygon)
	#SYNTAX:
	# explode("using characters", Separate What)

?>
Comment

PREVIOUS NEXT
Code Example
Php :: PHP DateTime Format date time according to a time zone 
Php :: PHP strip_tags — Strip HTML and PHP tags from a string 
Php :: orderby not working with groupby laravel 
Php :: php include multiple files at once 
Php :: PHP join() Function 
Php :: how to fetch the sum of column in php mysql 
Php :: asin() php 
Php :: laravel eloquent get all where in 
Php :: in arrray php 
Php :: file upload in laravel 
Php :: composer install phpWord 
Php :: $_server php 
Php :: determine if file is empty in php 
Php :: php get html with special characters 
Php :: Laravel - Add conditional where clause in query 
Php :: php namespace class 
Php :: PHP - AJAX and PHP 
Php :: asset function in laravel not working 
Php :: sanctum 
Php :: add character after x characters in php 
Php :: sync laravel 
Php :: how to create a php website 
Php :: PHP stripcslashes — Un-quote string quoted with addcslashes() 
Php :: magento 2 colllection set select 
Php :: how to add x-xss-protection header 
Php :: symfony request type 
Php :: laravel dirty words check 
Php :: no cache hummingbird 
Php :: Uncaught Error: Call to undefined function add_submenu_page() 
Php :: codeigniter number format function 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =