I need to create a big array in my code, I have the values in several tables (for easy management). I select it and now I have all the values in an array, in memory in the way I want. My problem, I need to write this array down, into the code. Is there a way to take an array which sits in the memory and translate it into a string "array(...
Hey guys, I have recently been working on a pastebin script (for fun) and I've come across a problem that I can't seem to solve in CSS. I have a table with 2 columns. 1 column is used to display the line numbers and the 2nd column is used to display the code. I can't seem to get the numbers match up with the lines in the code so it looks...
I’m coding an application with server resources in mind, so I don’t want to use too much so that this application scales in the future. I don’t mind writing my own queries. So, is ActiveRecord resource intensive for my application? Or does it not make a difference?
Thanks!
...
Hello,
Ultimately here is my goal. Using Zend_Form I want to turn this idea http://www.sohtanaka.com/web-design/fancy-thumbnail-hover-effect-w-jquery/ into a list of radio buttons.
Kind of using this concept.
http://theodin.co.uk/tools/tutorials/jqueryTutorial/fancyRadio/
I know there has to be a way to do this but I can't seem to...
I am creating a news archive for my site and want to create an overview page from the following DB table
id - Unique identifier
newsDate - in a format XXXX-XX-XX
title - News Item title
details - News item
photo - News Item Photo
caption - News Item Photo caption
update - Timestamp for record
The news on the site is current but I hope...
Earlier I asked this question, which basically asked how to list 10 winners in a table with many winners, according to their points.
This was answered.
Now I'm looking to search for a given winner X in the table, and find out what position he is in, when the table is ordered by points.
For example, if this is the table:
Winners:...
I am new to Linux and I am attempting to install the PHP PEAR library on a virtual server which is running Ubuntu. I am following a tutorial that covers installing PEAR but have run up against an area where I am confused. When running the PEAR installation program I am prompted as to what I want the INSTALL_PREFIX to be. Evidently the IN...
How to rotate an image with PHP, any degree, without having the filled space? For instance, if I rotate an image 10 degrees, the image rotates fine but the container around (square) gets filled with black. Is it possible to get rid of this, when for example merging 2 images?
...
I'm using cake & have a web form for entering URLs to go into my db. There will be one input space (url1) and below that a link that says "add another URL" which, when clicked, generates a new form (url2) and reuses the "add another URL". So it would be like:
echo $form->input('name');
echo $form->input('id');
echo $form->input('url1'...
Hello i'm trying to create a report using FPDF from a website using php, see i need to put a signature line at the en of the report, but I don't know how, can you help me??
...
My php is a little rusty but this is boggling my mind right now. I googled this and read all the stackoverflow questions I could find that looked related, but those all seemed to have legitimate undefined variables in them. That leads me to believe that mine is the same problem, but no amount of staring at the simple bit of code I have r...
I am a self thought hobby programmer and therefore don't have the fundamentals always down the way you professionals do. So please excuse me if this is basic.
What is the purpose or benefit of return'ing $this when setting vars in the model.
I have seen this done in other places too but cant figure this out.
Sample code:
public functi...
Ok so I have managed to get the format of the date presented in HTML (upon display) to how I want (dd/mm/yyy)...However, the user also can change the date via a form.
So this is how it's setup as present. Firstly, the conversion from YYYY-MM-DD to DD/MM/YYYY and then display in HTML:
$timestamp = strtotime($duedate);
echo da...
When there are multiple PHP scripts running in parallel, each making an UPDATE query to the same record in the same table repeatedly, is it possible for there to be a 'lag time' before the table is updated with each query?
I have basically 5-6 instances of a PHP script running in parallel, having been launched via cron. Each script gets...
Hi.
Tumblr and other blogging websites allows people to post embeded codes of videos from youtube and all video networks.
but how they filter only the flash object code and remove any other html or scripts? and even they have an automated code that informes you this is not a valid video code.
Is this done using REGEX expressions? And ...
I googled for this problem but there is no answer for it.
I want my PHP script to generate HTTP response in chunked( http://en.wikipedia.org/wiki/Chunked_transfer_encoding). How to do it?
Update:
I figured it out. I have to specify Transfer-encoding header and flush it.
header("Transfer-encoding: chunked");
flush();
The flush is ne...
I've searched around with this and haven't found any clear answers.
I'm using Eclipse PDT. It seems that if I create a PHP Project, tags work (@todo, etc). However, if I create a project from SVN (still PHP based), tags don't work at all.
Does anyone know how to make tags and doc generation work on a per project basis and still import ...
I want to show Popup window contain YouTube video. My question is how to resize YouTube Player when user resize the Popup Window ?
Head section of Popup windows PHP/HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/x...
Is there an already cooked php solution?
...
I have an upload box...
< form action="upload_file.php" method="post" enctype="multipart/form-data"><BR>
< label for="file">Filename:</label><BR>
< input type="file" name="file" id="file" /><BR>
< input type="submit" name="submit" value="Submit" />
< /form>
Now when I click browse and get the Image I want to upload and clic...