Jump to content

a line number...


phpSensei

Recommended Posts

well the str_split() function can do the following

 

<?php

$str = "Hello Friend";

$arr1 = str_split($str);
$arr2 = str_split($str, 3);

print_r($arr1); // every index is a letter   $arr1(0) is 'H' $arr1(1) is 'e' etc
print_r($arr2); //takes every 3 letters $arr1(0) is 'Hel' $arr1(1) is 'lo ' etc

?> 

Link to comment
https://forums.phpfreaks.com/topic/62548-a-line-number/#findComment-311313
Share on other sites

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.