Can't reach a character in a string

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Fri Dec 20, 2002 7:21 pm

I've used another method:

Code: Select all

<?php
$bands= ("tindersticks-scott walker-plaid-pluxus-the residents");
$bandsArray= explode("-", $bands);
for ($i= 0; $i < sizeof($bandsArray); $i++){
   echo substr( $bandsArray[$i] , 0 , 1 )."<br>";
   }
?>

But I know there are those Perl based functions preg_replace that work perfect although I don't know them...

;)

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests