|
|
|
|
![]() ![]() |
Apr 24 2006, 07:00 AM
Post
#1
|
|
|
Incest is a game the whole family can play. ![]() Group: [MODERATOR] Posts: 1,217 Joined: 11-February 05 From: Heaven Member No.: 3,709 |
Say I have a variable such as $nav_item and it had to contents Home. IE:
CODE $nav_item = 'Home'; How would I make so that $nav_item was an array and had the following contents? CODE $nav_item = array ('h', 'o', 'm', 'e'); With the case changing (ie H would become h and U would become u) EDIT: Okay found out that I could change the case with array_change_key_case ($nav_item, CASE_LOWER); |
|
|
|
Apr 24 2006, 12:39 PM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 106 Joined: 1-April 06 Member No.: 21,148 |
Taken from http://us2.php.net/manual/en/function.preg-split.php
CODE $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); You can also just access individual characters in as string by treating it like an array, so "$str[2]" would return "r". |
|
|
|
Apr 24 2006, 06:13 PM
Post
#3
|
|
|
Incest is a game the whole family can play. ![]() Group: [MODERATOR] Posts: 1,217 Joined: 11-February 05 From: Heaven Member No.: 3,709 |
Thank you WindAndWater
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th September 2008 - 09:26 AM |