Skip to content

Tag: php

Do Not Duplicate VALUE if already exist on MySQL

I’ve been trying to accomplish this, but as other issues I just can’t figured it out. I’ve been reading around for posibles solutions but non of them goes along with my code, or if they do I can’t figure out how or where to use them. I have a DB where a user sends records. The database…

why use 0xffff over 65535

I’ve seen some PHP script which uses 0xffff in mt_rand(0, 0xffff). I do echo 0xffff; and results to 65535. Is there any significance of using this 0xffff? And also what is that?

Symfony2 Validating an optional field

In my form, I have a field with required option set to false, this field is optional. However, I would like to have a notBlank validation on this field when the field is used: Right now, I can’t use the validation constraint NotBlank because it will cause my form validation to fail when the field is unu…

Generate BIC from IBAN bank account number

Is there any existing library or script I can use to generate the BIC code from an IBAN bank account number (and other necessary information)? I’ve searched the web, but found only IBAN generators. Thanks in advance! Answer Solution for Belgian IBAN bank account numbers: There exists a webservice for Be…

WordPress localhost ftp

I have wordpress running on my localhost on mac Lion. Everytime I try to install or delete plugins it asks me for hostname, ftp username and ftp password. I configured my localhost to 127.0.0.1, but …

PHP number abbreviator

Edit: Function below now does the abbreviation correctly, implemented @Asad ‘s solution Hi I am currently working on a like button, I’ve got all the base functionality working nicely however I have started the number abbreviation code and hit a wall as I can’t figure out how to make the abbr…