Search found 6 matches

by japaja
Thu Jul 08, 2004 10:21 am
Forum: PHP - Code
Topic: [SOLVED] How to get filename without extension?
Replies: 12
Views: 2242

Bech100 wrote:What about files with a four letter extension!?

tiff
jpeg
etc...

Mark

Code: Select all

<? 
$fileWithoutExtension =   substr($imgArray[$randval],0,strrpos($imgArray[$randval],".") + 0);
echo $fileWithoutExtension;
?>
by japaja
Wed Jul 07, 2004 8:50 am
Forum: PHP - Code
Topic: [SOLVED] How to get filename without extension?
Replies: 12
Views: 2242

<? echo("<br>"); ?> <? $split = explode('.', $imgArray[$randval]); $filename_without_extension = $split[0]; echo $filename_without_extension; ?> <? echo("<br>"); ?> but what if : string.name.jpg ? SOLUTION IS <?echo substr("$imgArray[$randval]", 0, -4); ?>
by japaja
Tue Jul 06, 2004 12:09 pm
Forum: PHP - Code
Topic: [SOLVED] How to get filename without extension?
Replies: 12
Views: 2242

[SOLVED] How to get filename without extension?

<?php $imgpath = "thumbs"; $imgpath2 = "fullphoto"; $handle = opendir( "$imgpath" ); $handle2 = opendir( "$imgpath2" ); $imgArray = array(); while($file = readdir($handle)) { if( $file != "." && $file != ".." ) { array_push( $imgAr...
by japaja
Wed Apr 09, 2003 8:08 am
Forum: Javascript
Topic: javascript+form+search problem...
Replies: 1
Views: 1252

Finally I founded the solution for my problem ..Thank yOU TexasMan Oh what a DUMMY I AM! The logical OR || not the logical AND &&. if ( $trimmed == "" || $trimmed == "search..." ) &#123; echo "<p>Please enter a search...</p>"; &#125;
by japaja
Sun Apr 06, 2003 9:08 am
Forum: Databases
Topic: echo and highlighting problem
Replies: 0
Views: 289

echo and highlighting problem

My part of code is... query=trimmed // now you can display the results returned while ($row= mysql_fetch_array($result)) &#123; $title = $row&#1111;"ttitle"]; $string = ereg_replace ("<br />", " ", $ttitle); $title2 = $row&#1111;"ID"]; $title3 = $r...
by japaja
Sun Apr 06, 2003 8:58 am
Forum: Javascript
Topic: javascript+form+search problem...
Replies: 1
Views: 1252

javascript+form+search problem...

In "form" part I added... <form name="form" action="search.php" method="get"> <input type="text" name="q" /> <input type="text" name="q" value="search..." onfocus="value=''" size="16" height...