I'm developing a website in Brazilian Portuguese and I'm facing some really annoying encoding problems.
Words that should be written this way: óbito are being written this way: �bito
I have noticed that while the texts are still at the database they are ok. But when I use echo with PHP, the encoding problem comes up.
List of things I ...
Hello, say you are implementing an api that usually takes data in the form of associative arrays, processes them for validation etc and converts them into a different format (still an array, although the keys and overall structure is different), and then sends them off to get processed further. What would be the best way to handle this....
I'm having problems with this class definition because of the definition of $directories. Please help:
<?php
.....
class Config {
public static $directories = array(
"resources" => realpath(__DIR__),
"root" => $_SERVER['DOCUMENT_ROOT'],
"branch" => $_SERVER['DOCUMENT_ROOT'] . "/branch",
"templates" => re...
hi all. I have a such problem which I couldn't solve in a good manner. My solution needs too much time and loop uses catastrophically big memory. So I need a help.
I have 3 mysql tables.
Gorups
group_id
group_name
games
game_id
game_name
questions
question_id
game_id
question_name
question_text
question_groups
question_i...
PHP would be a lot cooler if you could write things like this:
$array = [2, 3, 5];
$object = { "name" : "Harry", "age" : 23, "cats" : ["fluffy", "mittens", "whiskers"]};
but, I just spent a lot of time looking for an extension (even an experimental alpha or anything) adding json syntax to PHP but found nothing.
Does anything like th...
Hi, i own a translation service and now im wanting to implement a TTS solution. Do you know any software that can be executed from php to generate mp3s on the fly for a specific text?
...
Hi,
For some reason, my jQuery isn't working properly, and I can't spot the mistake, although I may have some idea. Below is some of the code from group2.php, its for a chat application:
<div id="wrapper">
<div id="menu">
<p class="welcome">Welcome, <b><?php echo $_SESSION['name']; ?></b></p>
<p class="logout"><a id...
How can I parse a configuration value with PHP which is a number and a total of other numbers.
One example of this is:
1 -> Logging Enabled
2 -> Error Reporting Enabled
4 -> E-Mail Reporting Enabled
3 -> Logging + Error Enabled
5 -> Logging + E-Mail Enabled
...
Hi,
I have made a C# application that talks to my website via PHP(mcrypt) and visa versa.
I was wondering which is the best cipher to use and if there are any ciphers that are tempermental when encrypt/decrypting over different lanuages.
I also wondered if I need to convert the data to a different format before encrypting.
E.g. Say...
I'm getting an array of values back from a database where I get an array with values like this:
Array ( [6712] => 64.79.197.36:43444 [6712] => 64.79.197.36:43444 [6711] => 64.79.194.56:41113 [6710] => 64.21.47.20:8080 [6709])
Where the numbers in brackets, like [6712] are the "id" field in the database.. the issue is that in my scrip...
Hello I have a search engine, but in the pagination I have to redefine the searchterm in the url, I mean <a href='http://mysite.com/search.php?q=searchTerm&currentPage=2'>Next</a>.
Please tell me if I'm doing it well or there is another way to do it
...
Need php code to check shopping group and set tax rate to zero for Joomla/Virtuemart
...
I was wondering how can I find the width of an image using php.
...
Which string function can I use to strip everything after - ? The string is not predefined so rtrim() does not work.
9453-abcafaf3ceb895d7b1636ad24c37cb9f-100.png?1
...
Right now I'm creating a web-app which requires that multiple sets of data (including a URL, title, and date) be stored in a DB.
So for example, User1 may be storing Item 1 which consists of Example, http://example.com, and YY-MM-DD HH:MM:SS. And he may have multiple items with the same types of data.
Before, I was sotring all the item...
I'm building a PHP web application and need to know what the current date/time is. I cannot depend on the server's setting. Any web service I can use? I know there will be some delay accessing the time via web service, but I am fine with something that is not accurate to the last millisecond.
...
Hey guys, I am trying to match "address" in this page -
http://www.bbb.org/norfolk/business-reviews/tax-return-preparation/liberty-tax-service-in-virginia-beach-va-48000604
The source of address part has this HTML
<tr>
<td align="right" class="generalinfo_left">Address:</td>
<td class="generalinfo_right">1 S Main St Ste 1430<b...
I wrote the code below to split up a fullname from a .csv file into a first name, middle name, and last name. It works well and gives the following kind of output:
Eric,T.,Nolan
Mary,,Worth
Jim,T.,Lane
E.,Thomas,Powell
William,Reilly,Smith
Johnny,,Depp
Stevie,de,la Soul
I can get it to print to the screen, but need help putting it b...
I have a site that shortens links based on Noah Hendrix's tutorial on the subject. I decided that it would be great if I could track when users click the short URLs, similar to the way that HootSuite users can track their links with Ow.ly. I currently have a database which has the short URL stored along with the true URL and it's click...
I was wondering how do I allow only one email address? Also how can I only check for the @ sign in the email address to validate the email?
Here is my PHP code.
if (isset($_GET['email']) && strlen($_GET['email']) <= 255) {
$email = mysqli_real_escape_string($mysqli, strip_tags($_GET['email']));
} else if($_GET['email'] && strlen($_...