Help in concatenation

--0-874738058-1212753880=:58268
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,=0A=A0=0AI need to change PHP embeded in HTML to HTML embeded in PHP as =
trying to use modularity approach.=0AI'm stuck on below these lines where c=
oncatenation is the big issue. I have researched, read but couldnt sort thi=
s out after try really hard.=0ACould any one please help me to change this =
code to HTML embeded in PHP please. Mostly i'm getting confuse where text i=
s written in red=0AI know it is very basic question but this concatenation =
is confusing me so much. I have spended my whole day in sorting this out bu=
t :(=0A1. <a=A0class=3D"<?php=A0print($class);?>"=A0href=3D"<?php=A0print("=
$thispage".($y>0?("?start=3D").$y:""));?>"><?php=A0print($pg);?></a>=0A2.=
=A0=A0<a=A0href=3D"<?php=A0print("$thispage".($next>0?("?start=3D").$next:"=
"));?>"><<</a>=A0=0AThank you=0A=0A=0A
--0-874738058-1212753880=:58268--
Nasreen Laghari [ Fr, 06 Juni 2008 14:04 ] [ ID #1955309 ]

Re: Help in concatenation

------=_Part_9156_12552528.1212857667440
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

1.
<a class="<?php print($class);?>" href="<?php
print("$thispage".($y>0?("?start=").$y:""));?>"><?php
print($pg);?></a>
2. 0?("?start=").$next:""));?>"><<

turns into:


> <?php
> $string = '<a class="' . $class . '" href="' . $thispage;
> if ($y > 0) $string .= "\$start=" . $y;
> $string .= '">' . $pg . '</a>';
> ?>






> <?php
> $string2 = '<a href="' . $thispage;
> if ($next > 0) $string2 .= '?start=' . $next;
> $string2 .= '"></a>';
> ?>

I can squeeze the if operation into the string but I can't see good cause
for this (this is less spageti this way)
On 06/06/2008, Nasreen Laghari <nasreen_laghari [at] yahoo.com> wrote:
>
> Hi,
>
> I need to change PHP embeded in HTML to HTML embeded in PHP as trying to
> use modularity approach.
> I'm stuck on below these lines where concatenation is the big issue. I have
> researched, read but couldnt sort this out after try really hard.
> Could any one please help me to change this code to HTML embeded in PHP
> please. Mostly i'm getting confuse where text is written in red
> I know it is very basic question but this concatenation is confusing me so
> much. I have spended my whole day in sorting this out but :(
> 1. <a class="<?php print($class);?>" href="<?php
> print("$thispage".($y>0?("?start=").$y:""));?>"><?php print($pg);?></a>
> 2. <a href="<?php
> print("$thispage".($next>0?("?start=").$next:""));?>"><<</a>
> Thank you
>
>
>

------=_Part_9156_12552528.1212857667440--
Nitsan Bin-Nun [ Sa, 07 Juni 2008 18:54 ] [ ID #1955364 ]
PHP » gmane.comp.php.database » Help in concatenation

Vorheriges Thema: Re: Help in concatenation - modular development
Nächstes Thema: Working with "time" data from MYSQL