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

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.

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... :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.