-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
what part of "url must be inside the quotes" do you not understand? Again, it's the exact same thing as your other thread. stuffhere.backgroundImage='url(path/to/file)' seriously man, I'm not trying to be mean for the hell of it, but you aren't even trying. Or if you are, then maybe you should find something else to do, because I've already told you several times what you need to do, as well as you already have a working example in your other thread. If you cannot use basic common sense and follow simple directions, then pick another hobby, this isn't for you.
-
just multiply by -1. If it's a positive number, it will become negative. If it's negative, it will become positive.
-
you mean like an absolute url path? echo $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
-
this is exactly like your other thread. You want to change the value of something. look at your other thread. the backgroundImage value was wrapped in quotes. even the url part. blahblah.backgroundImage='url(...)' does it not stand to reason that you need to do the same thing here? As in, since url is part of the string, you would do this: blahblah.backgroundImage='' this isn't coding. this is common sense.
-
jquery eh? shouldn't this be in 3rd party scripts? BURN.
-
sorry, crystal ball still in the shop. You need to be way more specific, as well as provide relevant code.
-
[SOLVED] Youtube/Flickr "lights-out"-like effect?
.josh replied to zeeshan_haider000's topic in Javascript Help
a lot of people accomplish that by loading a semi-transparent gif in a higher level z-index layer (with the video being even higher, of course) -
same thing as what you did for your other thread, except set it to ""
-
suppose you could turn around and check if the id attribute exists
-
avg()
-
obviously. The way you had it before, every time the loop iterates, your previous values get overwritten by the new ones, so when you go to display it later, you only have the last entry. So you put them into an array, so that each value is saved in an element of the array. When you get to the code where you actually display it, you have to loop through the arrays.
-
if all the other data in the rows are identical, and the only difference between one row and another is whether dept is T_LEAD or T_SUP, then why have that column at all, if you want them to be grouped anyways? Or am I not understanding your intention here? Because it sounds to me that the real problem is somewhere in your system you are putting data into the table twice, if you are only wanting to show data once.
-
Why doesn't my while loop show sometimes unless I click the page?
.josh replied to pneudralics's topic in PHP Coding Help
so..in IE8, when you view source, is it showing the output from your loop, or the actual php code? -
if the page is already a php and you can write php in other places, then yes, you can do that. your php gets parsed on the server and the results sent to the client (the browser). As far as the browser is concerned, it's just plain text, hardcoded.
-
well that would only work if the file is a .php file in the first place (or as I mentioned, another mime-type listed). If it's on a regular .html page, he probably doesn't have the server setup to parse it on a .html file.
-
in order to for the server to parse the php, it has to recognize the file type (the mime type) as a file that you want to parse php with. If you have php installed on your server, then probably it is setup to parse php script in files of type somepage.php by default. You can change it to recognize other mime-types in your cpanel (or other interface you may have) or on command line. Since you are working with a template system, it would probably be easier for you to add .css to your mime-type list for parsing php, rather than trying to hack the templating system to look for your style sheet as a .php (or .html if it's as you say, internal css on some .html page or whatever).
-
yes. * is a quantifier. It means match 0 or more of something. So if you want to look for a literal *, you are right, it must be escaped.
-
That is regular expressions, or regex, for short. There is a subforum to this forum dedicated to it, with stickies to tuts, books, etc... basically that pattern says; ~\[i:[^\]]*\]~i the pattern delimiter. tells the regex engine where the start and stop of the pattern is. literal [ . that character is significant to the engine, so we have to escape it so engine knows to look for a literal [. more of what you want the engine to match literally basically says to keep matching everything until you find a ] literal ]. the closing tag to literally match. pattern modifier. means case-insensitive (so it will work with [i:blahblah] or [i:blahblah]
-
yep. that would look for [list:randomstuffhere] and change it to <list>
-
Parse a US street address into its individual parts?
.josh replied to fr34k's topic in PHP Coding Help
trying to parse an address string without a database to validate whether the street names, cities, states, zip codes, etc.. exist, is a waste of time. Formats are arbitrary. So unless you have access to google map database sort of thing, don't bother. Even google maps, with all that info at their disposal, still has to give you a list of suggestions of what they think you mean. Instead, make the user enter that stuff in separate fields and validate it on more reasonably known things, like you know a zipcode is 5 numbers, you can reasonably keep a list of states and abbreviations, etc... -
$string = preg_replace('~\[i:[^\]]*\]~i','<i>',$string); $string = preg_replace('~\[/i:[^\]]*\]~i','</i>',$string); to get your started
-
hard to say for sure without knowing your database structure and more explanation, but offhand, you could try $q = "SELECT DISTINCT(`dept`) FROM `sprint` WHERE dept='T_LEAD' OR dept='T_SUP' GROUP BY `dept`";
-
[SOLVED] Using ScanDir to get list of directories with extra info
.josh replied to Julie-San's topic in PHP Coding Help
k well then you would actually need Ingredients: 1 opendir 1 while loop 1 readdir 1 if condition 1 is_dir 1 filemtime 1 closedir 1 asort or arsort Instructions: assign opendir to a variable. create a loop with the while, with readdir as the condition. inside the loop, check if the current file is a directory, with is_dir. If it is, create an array called $dirs with the file name as the key, and the last modified time as the value (using filemtime). after the loop, close the dir with closedir, and use asort for ascending sort by last modified time, or arsort for descending ordering. -
okay well if you have it set to be "not null" then they are not null, and that's why your query isn't working the way you want. You need to change the condition to something else like ..where `sup` != '' or ..where length(`sup`) > 0 edit: ah okay cool.
-
[SOLVED] Using ScanDir to get list of directories with extra info
.josh replied to Julie-San's topic in PHP Coding Help
scandir is_dir