Jump to content

Using explode without a delimiter


guttyguppy

Recommended Posts

In general, you can only explode (or split) on a defined delimiter.  However, since strings are arrays, you can abstract individual elements of a string.

 

<?php
$var = "abcde";
echo $var{2}; // note curly braces. This displays c, array counts begin at zero
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.