From what I understand, when MySQL compares a string stored in utf8_general collation, it first converts it's characters to their ascii equivalents. In other words ḩ = h, ţ = t, ā = a, í = i, etc...
Is there a mapping table which I could use to implement similar comparison function in php or javacript? I know there are alternatives in p...
Hi,
I'm trying to combine 2 different regex with the same names into one and got the error message like this:
Warning: preg_match(): Compilation
failed: two named subpatterns have the
same name at offset 276 ...
One regex looks like this:
'%<div class="artikkelen">[\s\S]*?<h2>(?P<title>[\s\S]*?)</h2>%'
The other looks like ...
Hi,
I'm in a situation where I need to auto-auth users between an ASP.NET website and WordPress. The idea is once you're logged into the ASP.NET website and if you browse the WP pages your logged in automagically and vice versa.
In ASP.NET I can auth users against WP database but that's all I can think of, so the question is.
-How to ...
I need to write some code in PHP that performs an action only on alternating weeks, based on the day of the week (mon, tue etc) rather than the number (1st, 7th etc).
So on a cycle starting on a Monday it should run for one week then not the following week.
I am sure this must be easier than I think but can't seem to work it out, so h...
I have been having an ongoing fight with this email setup. The code below works on my server but on the client's server it displays the message source (from reply to) as the message body. The server it is on is a plesk server. Can anyone help me with this? I am sure it is a problem with with the header because if I take out the reply to ...
I'm trying to launch & control UI automation tool through PHP. I'm able to launch the tool using proc-open but it launches the process in background hence the application doesn't appear on the screen. I'm using proc-open so that I could capture exit status of the application. Please let me know if there is a way to launch and control app...
How can I apply a watermark to an uploaded picture using PHP?
Example LINK: http://www.kitebeaches.com/kitesurf/uploadPicture/NIRVANA%5FClub%5FVillage.html
...
I have a web form and when it gets submitted I post the data to a PHP page. Now I need PHP to convert every value from the POST to be converted to an integer. At the moment I tried do do it as below
$_POST = array_map("convert",$_POST);
function convert(val){
return (int)$val;
}
Is there a built-in PHP function for this.
...
How to install eclipse php in ubuntu platform using apt get install. Any other utilities are required to do that
...
Weird to describe but here goes.
I have a table with several rows. One of the fields in each row, is for an image. Now i dont want to show the image itself, but rather the filename of the image as a link.
When i click that link, i want to popup a window that will let me upload or choose a new image from a list.
The key is, when im don...
When I use getJSON in JQuery to an external domain the request that is made does not include cookies for that domain. I'm using this for my analytics script that I am writing and I need to set a cookie on the external domain where the script is running so I can track unique visitors.
The files
domain1.com/website.html
<script src...
Hi guys, I have
index.php:
<form action="update_db.php" method="post">
<?php
require_once 'modules/' . $currentModule . '.php';
?>
</form>
modules/*some_module*.php
...
<input type="submit" />
...
update_db.php:
@extract( $_POST );
print_r( $_POST );
After loading index.php i see need form. But duri...
I'm using the PHP mail() function to send emails from a Linux server, but using Exchange as the main MTA. To achieve this sendmail has been set up to relay everything to the local Exchange server, which then sends the emails out.
This is working correctly, but the PHP script seems to wait until the timeout limit before finishing. I thou...
I'm looking for a good framework for PHP and see most offer the MVC approach, are there any other (or better) design methods/approaches that would be considered more efficient or best practice? MVC is starting to look dated but I wanted to know if it's still considered the industry standard.
...
How do I sort the "name" field in ASC and also sort in DESC ordering using only php?
$stud = json_encode($arr);
print_r($stud);
output: [{"id":1, "name":"Some Name"},
{"id":4, "name":"Another Name"},
{"id":9, "name":"Third Name"}]
i need this type
$stud = [ {"id":4, "name":"Another Name"},
{"id":1, "name...
I am using PEAR's Quickform package to validate a form I have, I need help getting a validation rule applied to a group of checkboxes.
$subjectArea[] = HTML_QuickForm::createElement('advcheckbox', 'SubjectArea', null, 'Student', 'id="subjectareastudent"', 'Student');
$subjectArea[] = HTML_QuickForm::createElement('advcheckbox', 'Subject...
I'm having a hard time understanding the PHP control structure declare() and where/how it would be used.
http://us.php.net/manual/en/control-structures.declare.php
I was hoping someone could explain this to me.
Thank you in advance.
...
Hello all
I am starting a new project with my new employer. I am used to developing applications in Ruby on Rails. The team I am working with are more orientated to PHP and have decided they would like to use Zend framework for our new project. I am already reasonably familiar with PHP but not Zend.
I am looking for any resources that ...
Hi guys, i have a strange problem... I'm getting string-data from db:
$siteDesc = strval( $configHandle->getConfigValue( 'SITE_DESCRIPTION' ) );
var_dump( $siteDesc );
It returns:
string(19) "Some description..."
But in code:
<input type="field" name="site_desc" value="<?=$siteDesc;?>" />
There is a lo of spaces in textfiel...
In the context of having a list of user that has an icon next to their name, is it better to cache all images of Gravatar for few minutes or it's fine to directly display the image from Gravatar? The list is around 200 users on every pages.
...