-
Posts
8 -
Joined
-
Last visited
Never
Posts posted by SingingCrane
-
-
Hmm...another question since we are here (relative to the array)...
Can one specify directories in an array? -
Ok...I think I understand what is going on with this....lemme see if I can 'splain and tell me if I am on the right track or not...
The code is saying 'match' in the array of what the variable $arr specifies [(in_array(substr(start from the 3rd character at the end of * and give a length of 3 characters), variable] and print only that type.
Yay? Nay? I'm really fresh with this stuff and still getting my head around a lot of basic principles... -
Hey that worked great! Thanks thorpe! I really appreciate it!!
I will point out however that your code needs one more end parenthesis on the if statement (I got an error doing a copy and paste DOH!). Now I just need to break it down in my head as to how your addition works and I am all set! Thanks again! -
Hmm...that didn't work for me. Rather, [i]none[/i] of the files now appear from the directory. I am a littl confused as to how explode() works, but I do understand the reason for the array.
Not sure where to go with this. -
I am working on a page where I have a lot of thumbnails. I have specified the image sizes at 50px, 50px to make them square so that I could have them all sit in nice neat little rows. So my question is...
How do I get the images to all sit right on the edge (left, right, top, bottom) of the images around them? Using CSS that is. ;)
Thanks for any help!! -
I am pretty sure that you can do this with Ajax (I am learning about Ajax myself actually) but I think this type of activity requires a persistent connection which some hosts don't handle all that well...not to mention it takes up a bit more bandwidth in the long-term. There are some pretty good Ajax tutorials around (not to mention books). I'll be a little redundant in suggesting a search on Google for Ajax help. ;)
Just my 2cents. :) -
Hi my name is S.C. and I am a n00b.
There...now that [i]that[/i] is out of the way, I have a question (or two) about posting directory contents. ;D
I have my W.A.M.P. set up for which I am using to test my code before I post live content onto my site (which is Linux-based). So I have my page all set up to read the directory contents of a specified directory and post them on the page...I should add, specifically as images.
My first question is how do I go about telling the parser to ignore sub-directories?
My second question is how do I specify ONLY the types of files I want it to display, or is the way I am doing it correct? i.e. can I add more distinctions like ($file != ".txt") etc...?
I suppose I should go ahead and post the code I have so far so that you can see where I am at...
[code]
<?
$pics = "<div id=\"info\"><p class=\"lbold\">This is a test page for images.</p>\n";
$folder = "PICS/CraterLake";
$dir = opendir($folder);
while($file = readdir($dir)) {
if (($file != "..") and ($file != ".")) {
$pics .= "<a href='$folder/Images/$file'><img src='$folder/$file' /></a>\n";
}
}
$pics .= "</div>";
echo $pics;
?>
[/code]
Relatively simple...like I said..I'm a n00b. hehe.
As you can see I am calling out the files as link images. The problem is that the parser is including the sub-directories in the same path and showing 'blank' links in addition to the images, even though the "." and ".." files are to be ignored.
Any help is greatly appreciated!! :)
Butting images right up against each other.
in CSS Help
Posted
If anyone has any other ideas that may work, I'm open to suggestion! ;D