![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: May 2006
Posts: 356
|
![]() How come when I try
$htmlfile=sprintf("./html/%s%d.html",$name,$num); it works fine but when I try to write $num as a string like so $htmlfile=sprintf("./html/%s%s.html",$name,$num); the resulting string gets partially overwritten. Is there a better way to do that? By the way I obtain $name and $num from 'list' of the out of 'explode' .
__________________
Buy PPC Traffic |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
If you want to make sure it's passed to sprintf as a string I think this should work:
$htmlfile=sprintf("./html/%s%s.html","$name","$num"); |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: May 2006
Posts: 356
|
just tried it, still overwrites, thanks though
__________________
Buy PPC Traffic |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
|
You can just say:
Code:
$htmlfile = "./html/{$name}{$num}.html"; ![]()
__________________
![]() Naughty America - Director of Technology It's a CELEBRATION bitches!! For the hottest content promote Naughty America! ![]() swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Jan 2007
Posts: 247
|
Swish, I think that { and } can be removed, right?
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Mostly retired
Industry Role:
Join Date: Apr 2006
Location: UK
Posts: 3,231
|
Quote:
PHP Code:
__________________
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
|
In this instance, yes.
Yes.
__________________
![]() Naughty America - Director of Technology It's a CELEBRATION bitches!! For the hottest content promote Naughty America! ![]() swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com! |
![]() |
![]() ![]() ![]() ![]() ![]() |