Peruttu

Simple array creating function for PHP needed

Hello,

I need help with the implementation of a function in PHP5.

This function has to be real fast, so we need regex.

This has to be done with Regex, because we need speed. If you can't handle regex, please don't bid

The input will be a string of a maximum of 1000 characters.

The sting BESTEHT of normal text and HTML-Tags

Example

$string="Hello, <b>world</b>! A <font color="red">nice</font> test."

The function should split the string along every single word but not inside HTML tags. The HTML tags must remain untouched inside one array element

Result:

$back[0]["text"]='Hello,'

$back[0]["html"]=false

$back[1]["text"]='<b>'

$back[1]["html"]=true

$back[2]["text"]='world'

$back[2]["html"]=false

$back[3]["text"]='</b>'

$back[3]["html"]=true

$back[4]["text"]='!'

$back[4]["html"]=false

$back[5]["text"]="A"

$back[5]["html"]=false

$back[6]["text"]='<font color="red">'

$back[6]["html"]=true

$back[7]["text"]='nice'

$back[7]["html"]=false

$back[8]["text"]='</font>'

$back[8]["html"]=true

$back[9]["text"]='test.'

$back[9]["html"]=false

I think it is best to split the string first with help of reg ex and than make a walkthrough with every element of the array and check for is_html().

Please ask before your but!

Taidot: PHP

Näytä lisää: string b, speed color, regex is, regex in c, regex example, regex c, php tags, php string to html, php function for, html 5 font color, element 8, creating simple arrays php, php string single word array, extract text html php array, regex inside html tags, array function php, php array add characters, php ajax xml, php needed, xoops php5, regex &, php regex test, walkthrough , sting, Regex

About the Employer:
( 2 reviews ) Neuss, Germany

Projektin tunnus: #409123

16 freelanceria on tarjonnut keskimäärin 64 $ tähän työhön

omtechnologies

Cheapest bid for simple work. Please check PMB for details

30 $ USD 1 päivässä
(147 arvostelua)
7.4
skywalker65535

I can do it good, let's start

30 $ USD 1 päivässä
(28 arvostelua)
6.3
www6STECHcom

########Please check PMB########

30 $ USD 1 päivässä
(35 arvostelua)
5.8
voituk

Easy to do.

30 $ USD 0 päivässä
(26 arvostelua)
5.5
hieutc

Hi, I can give you the solution right now if you select me. Regards,

30 $ USD 1 päivässä
(15 arvostelua)
5.0
diggitalbrains

Hi! Please see PM, Regards, DiggitalBrains

30 $ USD 1 päivässä
(30 arvostelua)
5.0
patir

can do it today. thanks.

30 $ USD 0 päivässä
(12 arvostelua)
4.7
dhirenkashyap

Hello, I'm ready to start work. I've good knowledge. I can do this according to your requirements. 1) NO Advance, NO Upfront, NO Escrow payments 2) Unlimited options unless you are 100% satisfied 3) Unlimited R Lisää

65 $ USD 3 päivässä
(6 arvostelua)
4.4
softwaresbuilder

plz see pmb

30 $ USD 1 päivässä
(17 arvostelua)
4.1
onlywebsite

See PMB for more information.

250 $ USD 5 päivässä
(5 arvostelua)
2.4
tiblug

Hi I have 4+ years experience in php.I have work on many framework like cake php,joomla,smarty ,Magento etc.I can do your work with full customer [url removed, login to view] give me one chance. Thanks

250 $ USD 2 päivässä
(0 arvostelua)
0.0
seenemca

hi i am ready do it now read my pm

30 $ USD 1 päivässä
(0 arvostelua)
0.0
seditiosus

Very easy regex. Ready to start.

30 $ USD 1 päivässä
(1 arvostelu)
0.0
msnathan84

Hi, I'm very much interested in this work. I've posted my previous work as per your requirement to your PMB. Awaiting for your response to start the work. Regards, Senthil.

75 $ USD 1 päivässä
(0 arvostelua)
0.0
alpeshpatel1683

i worked on 6 project using regex... , so my work will tell my qulity

50 $ USD 2 päivässä
(0 arvostelua)
0.0
cainwong

Please check PMB for the codes. Thanks :)

30 $ USD 0 päivässä
(0 arvostelua)
0.0