Barter Zone
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsGeneralBarter Zone

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old July 14th, 2007, 02:30 PM
27amDotCom 27amDotCom is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Penticton, BC, Canada
Posts: 2 27amDotCom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 2 sec
Reputation Power: 0
One modification to my current .php script… $50 US if you complete it for me

I need one last change to a .php script. If you’re comfortable with PHP and would like a quick job, let me know.

In short, I need one of the values that the script calculates to be displayed multiple times on the same webpage. Currently, it only allows one instance of it to be displayed.

For example, if the value is the number of hours of sunshine in a day, then throughout the webpage I’d like to have a Variable Field where this number can be displayed .. but I want to use the variable field multiple times on the page (currently it displays just once).

Ie: July 14th, 2007 – Vancouver, BC saw ______ hours of sunshine. Being a city of a lot of patios, this also meant Vancouverites had at least ______ hours of great patio weather.

The above is a bit of gibberish content but you get the point. Basically, I need the variable to be displayed multiple times through the content. With the current setup of my script, it only displays once.

If you think you have a fix for this, please get in touch. I expect I’ll receive a lot of replies so if you could summarize why you think you know what the problem is (or what your previous experience is in coding similar functions in scripts), I’d appreciate it.

Contact me by PM on here, or (preferred) email me at rob AT dearemployee DOT com

Reply With Quote
  #2  
Old July 14th, 2007, 08:16 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 962 IAmALlama User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 5 h 35 m 26 sec
Reputation Power: 2
just use something like str_replace() to replace tags like {SomeTag}.

ie:

PHP Code:
 $someText "{Var1} bottles of beer on the wall. {Var1} bottles of beer. Take 1 down, pass it around. {Var2} bottles of beer on the wall.";
$replace['{Var1}'] = 99;
$replace['{Var2}'] = 98
$fixedText str_replace(array_keys($replace), $replace$someText);
echo 
$fixedText


this should take all of about 2 minutes to implement and test.

Reply With Quote
Reply

Viewing: Codewalkers ForumsGeneralBarter Zone > One modification to my current .php script… $50 US if you complete it for me


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway