-
Posts
208 -
Joined
-
Last visited
Posts posted by ki
-
-
hey guys, havent asked something in awhile but now ive got this new question
I got help from someone on making data from an array turn into links with this function:
function searchLinks($searchStr) { $searchAry = explode(",", $searchStr); foreach ($searchAry as $key => $term) { $searchAry[$key] = "<a href=\"search.php?t=".urlencode(trim($term))."\">" . trim($term) . "</a>"; } $searchStr = implode(", ", $searchAry); return $searchStr; }
what I want it to do is also detect breaks such as "\n"
so it would also treat breaks as it being seperated and returning back to a break
-
Alright, thanks for the help.
-
Thanks guys, they work fine. Does this effect bandwidth at all? And if so, which one if more effective?
-
How do you get the title of a(n) external webpage? Ive seen it done on the vBulletin's software. Anyone know how to exactly do this? Or is there a PHP function already added to the PHP software that I don't know about.
-
okay with a bit of tampering i figured out how to do it:
srand((double)microtime()*1000000); $aFriends = explode(",", $p1->friends); foreach ($aFriends as $key => $term) { $aFriends[$key] = $term; } $rFriends = array_rand($aFriends, 2); echo $aFriends[$rFriends[0]]; echo $aFriends[$rFriends[1]];
hope that helps someone in the future
-
can someone help me with this? im still getting nothing from different alterations to my code, I have no idea why its messing up like this
-
what I would do is setup a mysql database and use the GET function, like: dl.php?id=$1, and save the files that are in the directory to special ids
-
if you wanna get into books, "PHP5" a big purple book for, i forgot, like 20 bucks at barnes and nobles goes over alot with php even into some XML, cookies, sessions, logins, databases, etc
-
would it actually be possible to add each random selection from the $aFriends array and make a new array entirely and implode it?
-
good point sorthy
thats why I did that with my 404.shtml page
so you get an error like "wrong id"
-
edit your .htaccess file and use the following:
RewriteEngine on RewriteRule ^([^/\.]+)/?$ p.php?user=$1 [L]
-
okay my array would end like this:
$aFriends = array(1,2,3,4,5,6,7); $rFriends = array_rand($aFriends, 6); for ($i=0; $i<6; $i++) { echo $rFriends[$i]; }
I want it to randomly choose the numbers that are found in the array.
so for example it would ed out like:
5,1,7,3,2,4
and so on
and no im not having any error issues
-
have you tried the copy() function?
-
http://www.allsyntax.com has some okay tutorials but you can find alot of great tutorials on the frontpage of phpfreaks. design wise, I get my ideas from different websites. Someone on this site, I forgot who, made this site: asiteaday.org, showing different unique styles of sites for ideas.
-
thanks for the reply, but unfortunatly it doesnt work, i have no clue why.
-
great job, i like the idea of a docking menu for a website, very original.
I have a question tho, for the color picker, how did you go about making the slider?
-
okay basically my problem is that my info isnt displaying.
my code:
$aFriends = array($p1->friends); $rFriends = array_rand($aFriends, 6); for ($i=0; $i<=6; $i++) { echo $aFriends[$rFriends[$i]]; }
$p1->friends is pulled from a mysql db and has for example: 1, 3, 4, 5, 7, 9, 10, 15
what I wanted it to do was pull 6 random numbers from the array and its not doing that :/
any help would be appreciated
-
are u talking about a timeout?
-
my gamercard.net is that something your looking for?
-
Im having a blank,
I have this list
<ul> <li>DYNAMIC CONTENT</li> <li>DYNAMIC CONTENT</li> <li>DYNAMIC CONTENT</li> </ul>
they're all having different values of space going in, but I want them to be the same length so that when I hover over them it will look even not based on the size that each individual li is. any help so they're all the same size? without width because u don't know how big they are actually going to be
-
have you tried vertical-align?
-
wait is the javascript going to be returning the same page by a time limit of some sort or the matter of user clicks
-
thanks for the reply, but that only would benefit this page it effects other pages when i add the -2 unless i embed
-
try <img src="imgpath.ext" style="float: (right or left);">
search links...
in PHP Coding Help
Posted
its being grabbed from a multi-line database entry and a break is \n. but i dont want the commas to also be breaks