Re: how would I do this?

From: Date: Mon, 27 Dec 2010 21:28:12 +0000
Subject: Re: how would I do this?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-310250@lists.php.net to get a copy of this message
On Mon, Dec 27, 2010 at 2:13 PM, David McGlone <david@dmcentral.net> wrote: > Hi all, > > I am trying to make the link in this code not show the underscore and I > can't > figure out how I could do it. I've tried various different things I thought > would work. I've tried things like "lawn_maintenance"=> "lawn > maintenance", > I > tried concatinating "lawn" . "maintenance" and various other things. The > examples above both produce just the word "lawn" > > here's the code I have so far: > > $services = array(lawn_maintenance, core_areation, over_seeding, > hedge_trimming, mulch_installation, natural_debris_removal, > leaf_cleanup_removal, snow_plowing); > > > foreach ($services as $service){ > > echo "<ul><li>&raquo; <a > href=index.php?page=$service>$service</a></li></ul>"; > } > just clean up the array definition: $services = array('lawn_maintenance', 'core_areation', 'over_seeding', 'hedge_trimming', 'mulch_installation', 'natural_debris_removal', 'leaf_cleanup_removal', 'snow_plowing'); > Could anyone give me a hand? Obviously I don't understand arrays very well > :-/ > looks more like it's the strings you're struggling with ;) -nathan

« previous php.general (#310250) next »