For example:
$string="<aa>xyz<bb>123<ccc>";
I want to get the substring 'xyz' from $string.Is it possible?
For example:
$string="<aa>xyz<bb>123<ccc>";
I want to get the substring 'xyz' from $string.Is it possible?
You can also use a regex to explode the string into an array. this would give you the substring you want in $arr[0] This will work regardless what the tags are, and allow you to easily which ever substring you want.
<?php
$string="<aa>xyz<bb>123<ccc>";
$arr = preg_split("/<[^>]+>/", $string, 0, PREG_SPLIT_NO_EMPTY);
var_export($arr);
yes it is possible
$string="<aa>xyz<bb>";
echo substr($string,4,4);
you can also do this by strip_tags() it Strip HTML and PHP tags from a string