I have a drop shadow function in PHP.
In my php page, I have HTML set up like this:
<img src="<?php echo drpShadow($img_path[$i]);?>" />
The php function is like this:
function drpShadow($pic_url){ echo "Hello";
list($width, $height)=getimagesize($pic_url);
$pic_display="<table border='0' style='display:inline;' cellsp...
Hmm.. thats realy different problem
I fetch $links from db
linke this
$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS = '2' AND CATEGORY_ID = ".$db->qstr($id)." {$feat_where} {$expire_where} ORDER BY {$sort_cols[$sort]} {$sort_ord[$sort]} {$limit}");
The array looks like this
array(28) {
["ID"]=>
str...
I've done some reading on AJAX, and would like to create a listbox, that controls what is displayed in a separate textbox located within the same form. The backend of the website is handled in php, and the possible values and whatnot is stored within the MySQL database via php. What's the best way of obtaining the listbox values as well ...
Like :
declare int d[0..m, 0..n]
...
We are developing a collection class for a specialized PHP application. In it, there are functions named map, each, etc.
A debate has been brought up about calling some functions with a bad argument. For example:
public function each($fn) {
// ...
}
// ...
$collection->each('not a function');
Should the call to each throw an ...
I have a PHP script that must run 30 parallel times each with a different argument. What is the best way to do this so that each script can have as much even exposure to the processor as possible?
...
I saw this question,and pop up this idea.
Is there an efficient way to do this in PHP?
EDIT
Best with a demo?
...
I promise this isn't homework. I'm just a curious novice.
How does this:
function f($i){return $i<2?$i:f($i-1)+f($i-2);}
(written by someone smart)
produce the same result as this
function fibonacci($n, $arr = array(0,1)){
$arr[] = $arr[(count($arr) - 1)] + $arr[(count($arr) - 2)];
if (count($arr) == $n) return $arr[$n - 1];
els...
I am making a site where code will be displayed as plain text in a PRE tag (no highlighting, comments, no edit tags) and the I want them to be able to click a button and have the highlighted, commented and edit tag code to appear (also in a pre tag) .
Obviously I have to store the highlighted HTML code somewhere but I was looking for a ...
I have a large web app, and I think there are a bunch of old files that are no longer being used, is there an app which can tell me what these files are?
...
$this->_config = parse_ini_file($configIniFile);
And this is the content of $configIniFile:
; <?php exit; ?> DO NOT REMOVE THIS LINE
[database]
host = localhost
username = root
password =
dbname = openslopeone
port = 3306
adapter = PDO_MYSQL ; PDO_MYS...
I was looking at some code and I came across this line:
Machine drink[] = {{"Coke", .75,7}, {"Sprite", .55, 2}, { "Pepsi", 1.00, 5}}
At first I thought it was an array, but in php we don't create arrays like this,
unless if this is some advanced technique for creating an array that I am not aware of.
And why is it constructed li...
How do I create a php script that stores and displays when an article was last edited using PHP and MySQL.
...
Hi all:
I've convinced my boss to do the typesetting stuff using PHP(PHP Version 5.2.8).
And this is what I got so far(set Character encoding to Unicode(UTF-8) if you see misrendered Japanese characters):
demo page at my personal website
Basically, if you copy and paste the latin sample paragraph into the textarea and click the button...
i have a site where users enter a numeric code of 10 numbers. when reading from the db and displaying the codes i want it to display in this format
xxxx-xxxx-xx
how can i do this with php or jquery ?
...
Hi, I want to retrieve the title of the cricinfo.com webpage. How to retrieve it using php. Please help me
...
I am rather new to using the command line and php. That being said I have been trying to figure out how to use ImageMagick with the exec() function. I have this currently,
$command="/usr/local/lib/ImageMagick convert images/a.pdf images/a.png";
if(exec($command)){
echo 'yes';
}
else{
echo 'no';
}
Which is returning 'no'. ...
$html=<<<html
<div>A:<input type="text" maxlength="40" size="8" name=option$i."1" value='$option1'/>(answer)</div><br/><br/>
html;
echo $html;
$i is a variable. For example, when $i=5, the value of name should be "option51".
So the HTML code should be
<div>A:<input type="text" maxlength="40" size="8" name="option51" value='$option...
Can anyone tell me what the best way to export about 90K emails off of a Yahoo account? The way it stands now, I believe that every email would need to be extracted one by one. I'd like to write a program to do this for me. Can someone give me any ideas as to the best way to so this?
What I am after are the sender email addresses (that ...
I have one "go" script that fetches any other script requested and this is what I wrote to sanitize user input:
foreach ($_REQUEST as $key => $value){
if (get_magic_quotes_gpc())
$_REQUEST[$key] = mysql_real_escape_string(stripslashes($value));
else
$_REQUEST[$key] = mysql_real_escape_string($value);
}
I haven't seen anyone el...