explode Questions
9
Solved
is there a way to get the n-th element of a splitted string without using a variable?
My PHP code always looks like this:
$foo = explode(" ", "bla ble bli");
echo $foo[0];
Is there a shorter wa...
1
Solved
I am trying to explode a string on what looks like to be a null character.
This is what is what I am using: $exp = explode('\x00', $bin);.
Though this does not work. However, if I do $exp = exp...
2
Solved
I need to explode my string input into an array at the commas. However the string contains commas inside quotes.
Input:
$line = 'TRUE','59','A large number is 10,000';
$linearray = explode...
5
Solved
$variable = 'one, two, three';
How can I replace the commas between words with <br>?
$variable should become:
one<br>
two<br>
three
5
Solved
What's the best way to accomplish the following.
I have strings in this format:
$s1 = "name1|type1"; //(pipe is the separator)
$s2 = "name2|type2";
$s3 = "name3"; //(in some of them type can be ...
1
Solved
I'm working on a long string grabbed from a Session that uses "§" (Section sign) to group and divide different parts of the string.
Example: "ArticleID | Title | Date § ArticleID | Title | Date § ...
Veratrine asked 3/9, 2009 at 2:52
© 2022 - 2024 — McMap. All rights reserved.