I was wondering if anyone knew how to use some components of the Zend Framework without having to actually use the framework. For example, I would like to use their Zend_Validate components, but don't want the overhead of the framework as it's a small one-page script.
Can this be easily done, and if so, are there guides/tutorials on ho...
Have two connected sortable lists inside a div.Need to be able to reorder items in each list,updating with ajax.And I want to use it with php and mysql.but I don't know how to do it? could anyone can help me? thanks!
...
Hey so I'm not sure if this has any easy or good solution, but I figured I'd post here and find out if there's something I'm not thinking of.
Basically we have a bunch of data that's nested in logical groups (not necessarily reflected in the database architecture), and it's being loaded and navigated by way of dynamic ajax loads. Thi...
I have an xml file (Student.xml) like this
<student>
<studentinfo>
<name>
<first>John</first>
<last>Doe</last>
</name>
<gender>male</gender>
</studentinfo>
</student>
and my php code
<?php
$dom = new DOMDocument;
$dom->load('Student.xml');
$student = $dom->documentElement;
...
I'm running in a controlled, xp, intranet only environment and I need to start external processes from a PHP applications. (Backups, Reports etc.)
I can get system or exec to start processes that work silently. Here's a simple example
<?php exec ("echo hello > hello.txt");?>
I can get it to execute a bat file that has no visible out...
Due to comment below, here is the code on pastebin: http://pastebin.com/m6b0bb378
Here is the full script, if anyone wants to get it to do what i need in full, as i'm not a ocder so i'm getting lost here: http://pastebin.com/m6e8a5f5d
With the help of scragar, i've got to the above stage. The problem is that the "odd" part is only show...
I have a string like following:
test1, test2, test3, test4,
When I use the implode function on this I get back that there are 5 elements in the array.
How can i not take into account the last extra comma ?
or better yet, how can i substring that so that there is no extra comma in the end.
...
In CakePHP, is there a built-in way of validating a date to be within a certain range? For example, check that a certain date is in the future?
If the only option is to write my own custom validation function, since it'll be pretty generic and useful to all my controllers, which is the best file to put it in?
...
Hi,
I am trying to generate the following XML in my SOAP call:
<CResponse>
<ID>int</ID>
<Response Action="Apply">
<Question ID="$someint">
<Responses>
<Response ID="$someotherint" />
<Response ID="$yetanotherint" />
</Responses>
</Question>
</Response>
...
are they all stored in $_server? even custom ones?
...
<form method="POST">
<input type="checkbox" id="hrm" name="hrm" />
</form>
I mean when the form is posted.
...
I'm using following peace of code to output an array:
echo "======output without array_unique=====";
var_dump($selected);
echo "=====output with array_unique=====";
var_dump(array_unique($selected));die;
And the output is:
======output without array_unique=====
array
0 =>
array
'uri' => string 'http://localhost/conferen...
Quick background: I'm programming in PHP, I have a domain model with a separate data access layer (DAO classes) that are responsible for fetching data from the DB and creating domain classes.
Let's say I have a DAO class responsible for creating group and groupList objects. You can imagine the groups as a component of a social network; ...
I am a php web developer and in my one project i need to convert some html document (of 30 to 50 pages) into pdf .
For this I got following some solutions, among them some are php libraries and some are command line applications.
But each has their own advantage and disadvantage.
php libraries: Followings are some php libraries i trie...
We have FireSymfony that allows one to view the Symfony, PHP variables in a firebug panel, so I wonder whether there is a similar extension that allows me to view PHP variables for general PHP apps ( not just Symfony apps)?
...
Is there a built-in function for PHP for me to check whether two arrays contain the same values ( order not important?).
For example, I want a function that returns me true for the following two inputs:
array('4','5','2')
array('2','4','5')
Edit: I could have sorted the two arrays and compare them, but as I am such a lazy guy, I wou...
Hi,
So here's a very strange thing I've seen FCKEditor do: If there's a large amount of text pasted in it, it will simply drop it and empty itself upon POST for some very odd reason. I'm not sure what to debug to catch the error in my code or if it's just a limitation of the editor itself. Thoughts? I should say that it works just fine...
I'm tinkering with CodeIgniter and have come across Active Records for the first time. At first I dismissed it as something for people who don't really know how to write SQL. I realise now that my analysis was flawed and Active Records are pretty prominent, especially in Rails.
But what purpose do Active Records hold? Is it to abstra...
If I have a multi dimensional array in PHP like so...
[0] => Array
(
[url] => http://domain1.com
[domain] => domain1.com
[values] => Array
(
[character_length] => 25
[word_count] => 7
)
)
[1] => Array
(
[url] => http://domain2.c...
I am working on a videos sharing web site and I want to take screen shot from a flv video file from a another website like youtube. I am using PHP but i have no idea how to do it.
any guidance is appreciated.
...