Welcome Guest, Not a member yet? Register   Sign In
how to split a string
#7

[eluser]jedd[/eluser]
[quote author="megabyte" date="1255413682"]OK, from the beginning
[/quote]

Tremendous idea!

Quote:-take row from db which is a page of text.
- this text was placed in their from a form textarea.
- I then use nl2br, then format text to paragraphs using a function I created below.

Try not to fall into the trap of describing how to do something .. when you're asking the question of how to do something. Describe outcomes!

Quote:- I then want to split the html into 2 equal parts so that I can have 2 equal columns on a webpage like in a newspaper.

I feel we're getting close! Wink

How about this algorithm:

Calculate length of the string.
Identify mid-point.
Search forward from that mid-point until you hit a space.
Split the string at that position.


Messages In This Thread
how to split a string - by El Forum - 10-12-2009, 06:27 PM
how to split a string - by El Forum - 10-12-2009, 06:36 PM
how to split a string - by El Forum - 10-12-2009, 06:45 PM
how to split a string - by El Forum - 10-12-2009, 06:48 PM
how to split a string - by El Forum - 10-12-2009, 06:55 PM
how to split a string - by El Forum - 10-12-2009, 07:01 PM
how to split a string - by El Forum - 10-12-2009, 07:07 PM
how to split a string - by El Forum - 10-12-2009, 07:24 PM
how to split a string - by El Forum - 10-12-2009, 07:53 PM
how to split a string - by El Forum - 10-13-2009, 05:32 AM
how to split a string - by El Forum - 10-13-2009, 09:29 AM
how to split a string - by El Forum - 10-13-2009, 05:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB