0

Hi everyone

I'm trying to extract an address in three lines. But its giving it to me in one line. I'm creating a pdf form using mysql and php.

e.g: 252 westend drive Sommerset west 0185
I don't want it like this.

252 westend drive
Sommerset west
0185
I want it like this

$data [++$counter] = $row ["parent1_cell"];
$border[$counter] = "LR";

this is were the information is extracted.

Thanks

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by suley04
0

It is difficult to extract the address into three components.Because all the words are separated by space character.There is no other character is for string extraction.
Add , to your address like 252 westend drive, Sommerset west, 0185 before insertion.
Then split the string into array elements using explode() function.

0

why don't you try adding the "carriage return" character, for example:

$data [++$counter] = $row ["parent1_cell \n"];
$border[$counter] = "LR \n";

OR

$data [++$counter] = $row ["parent1_cell \r"];
$border[$counter] = "LR \r";

Let me know if that doesn't work... :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.