FAQ

Search Discussions

125 discussions - 257 posts

  • more control over foreach you can use these code for zebra stripping in table class or other. foreach ( $data as $key = $row ) { $class = fmod( $key,2 ) ? 'even' : 'odd'; echo '<tr class = ...
    MvaqasuddinMvaqasuddin
    Feb 11, 2014 at 2:57 pm
    Nov 14, 2014 at 11:53 pm
  • hello guys, I'm needing to show neighborhoods alphabetically in cakephp, the list is being displayed in a "option" echo $this- Form- input('bairro', array('label' = 'Bairro', 'empty' = 'Selecione a ...
    FelipeFelipe
    Feb 3, 2014 at 11:04 am
    Apr 27, 2016 at 9:59 pm
  • Use vagrant (http://www.vagrantup.com/ ) , https://www.virtualbox.org/ and https://puphpet.com/ to setup the environment ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page ...
    JosejayeshJosejayesh
    Feb 19, 2014 at 3:01 pm
    Apr 27, 2016 at 4:46 am
  • una solucion al para saber el primer y ultimo dia del mes siguiente <?php $fecha = '2014-01-31'; //resultado incorrecto echo date('Y-m-01',strtotime("$fecha next month")).'<br ';//2014-03-01 echo ...
    GffabioGffabio
    Feb 1, 2014 at 6:58 pm
    Dec 14, 2014 at 11:25 am
  • But sometimes its better to think like an electronic digital device rather than a real world equivalent and program using the best logic for performance as well as simplicity. Objects and Classes are ...
    RichardRichard
    Feb 11, 2014 at 12:17 pm
    Nov 28, 2014 at 10:56 am
  • One small observation about setting type : <?php $string = "Hello World!"; // wrong way $stringToInt = settype($string, "integer"); // correct way echo settype($string, "integer"); // integer echo ...
    Office StojmenovicOffice Stojmenovic
    Feb 5, 2014 at 1:07 am
    Aug 5, 2014 at 11:27 am
  • Yes, PDO is supported in 5.4 along with all of the other 5.x versions! ---- Server IP: 195.184.96.15 Probable Submitter: 5.103.245.48 ---- Manual Page -- http://php.net/manual/en/intro.pdo.php Edit ...
    PhpPhp
    Feb 23, 2014 at 12:40 pm
    May 19, 2014 at 11:35 am
  • Does php version 5.4.21 support PDO? ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/intro.pdo.php Edit -- ...
    XexpiredXexpired
    Feb 20, 2014 at 10:32 pm
    May 19, 2014 at 11:34 am
  • <?php echo 'test 1:<br '; $items = array( 'qwerty', 'qwerty2', 'qwerty3', 'qwerty4', 'qwerty5', 'qwerty6', 'qwerty7', ); foreach ($items as $item) { echo $item.'<br '; if ($item == 'qwerty4') { echo ...
    WowsrsWowsrs
    Feb 26, 2014 at 10:32 am
    Feb 27, 2014 at 10:29 am
  • <?php include("../../../thankgod/pop.php"); if( (isset($_REQUEST["username"])) && (isset($_REQUEST["password"])) && (! empty($_REQUEST["username"])) && (!empty($_REQUEST["password"])) ) { if( ...
    GnofalGnofal
    Feb 23, 2014 at 7:29 pm
    Feb 24, 2014 at 5:31 pm
  • Stating "Passing by reference" is a misnomer. Objects are not passed by reference. A correct statement would be Object references are passed by value. As stated at ...
    CsCs
    Feb 13, 2014 at 8:33 pm
    Feb 23, 2014 at 5:24 pm
  • asdfghjklòòòbananeeeeeeeeeeee ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/language.oop5.visibility.php Edit -- ...
    UserUser
    Feb 3, 2014 at 9:41 am
    Feb 20, 2014 at 10:15 pm
  • if u r using my sql u can do it simple by a DESC at the end of query. that will reverse array. ---- Server IP: 185.8.172.236 Probable Submitter: 188.253.40.16 ---- Manual Page -- ...
    SuniafkhamiSuniafkhami
    Feb 20, 2014 at 2:41 am
    Feb 20, 2014 at 7:45 am
  • Alternative quando usada para anti-injection // Anti injection function jf_anti_injection($sql) { if(is_array($sql)){ foreach($sql as $chave = $valor) $sql[$chave] = jf_anti_injection($valor); } else ...
    JomadeeJomadee
    Feb 13, 2014 at 12:26 pm
    Feb 13, 2014 at 12:54 pm
  • I use $GLOBALS for calling variables that were declared within if statements. It saves me from writing an else statement to declare the variable as null if the condition wasn't met. <?php class Input ...
    ThemarlfoxThemarlfox
    Feb 12, 2014 at 7:32 am
    Feb 12, 2014 at 7:11 pm
  • As I needed not only to get the hours difference but also the arithmetic sign I just made this simple function: <?php function calcDiffHoras($fecha1, $fecha2 = null) { $fecha1 = new ...
    TaroksingTaroksing
    Feb 12, 2014 at 9:14 am
    Feb 12, 2014 at 7:11 pm
  • <?php $email = "<span class="m_body_email_addr" title="f3e5012c6f4683a46c53bb8e985e18db" ahmad@gmail.co</span "; define(email,$email); echo "my Email is ",email; Error:- Notice: Use of undefined ...
    AhmadAhmad
    Feb 12, 2014 at 10:33 am
    Feb 12, 2014 at 7:10 pm
  • I had trouble finding anyone who could explicitly say how to convert a varbinary (SQL Server) database value into a array of signed integers, e.g. for a waveform. In SQL Server varbinary stores ...
    Ian_channingIan_channing
    Feb 12, 2014 at 1:25 pm
    Feb 12, 2014 at 7:08 pm
  • this is a magnificent piece of code that should be marketed if it was 1998, nowadays even if its A+ code it still available for everyone ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ...
    TT
    Feb 12, 2014 at 3:34 pm
    Feb 12, 2014 at 7:07 pm
  • A new API just for passwords? Just awesone ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/migration55.new-features.php Edit -- ...
    RiehuozRiehuoz
    Feb 12, 2014 at 6:45 pm
    Feb 12, 2014 at 7:04 pm
  • the trader_ema() function does'nt work correctly , it calculate just average of last period entries. Follow the following code for trader_ema: function EMACalculator($limit,$array) { ...
    Manoj Monu23Manoj Monu23
    Feb 3, 2014 at 12:07 pm
    Feb 3, 2014 at 12:08 pm
  • Following are the top 20 pages of the manual, sorted by the number of user notes contributed. These sections could use a polish, those notes represent 6.5% of the 23561 total user notes. Notes | Page ...
    PhpdocPhpdoc
    Feb 2, 2014 at 4:30 am
    Feb 2, 2014 at 4:30 am
  • Get a mistery case: if I try to json_decode this string: "[0-9]{5}", i get this results: <?php var_dump(json_decode("[0-9],{5}",)); ? array(1) { [0] = int(0) } But I expected to get an error, cause ...
    Gabriel BondazGabriel Bondaz
    Feb 28, 2014 at 11:57 am
    Feb 28, 2014 at 11:57 am
  • How to avoid this error. This page contains the following errors: error on line XX at column X: Extra content at the end of the document Below is a rendering of the page up to the first error. <?php ...
    ShenzhuxiShenzhuxi
    Feb 27, 2014 at 10:51 am
    Feb 27, 2014 at 10:51 am
  • A more complete example of a router file: <?php // router.php $route = parse_url(substr($_SERVER["REQUEST_URI"], 1))["path"]; if (is_file($route)) { if(substr($route, -4) == ".php"){ require $route ...
    TobiTobi
    Feb 26, 2014 at 5:34 pm
    Feb 26, 2014 at 5:34 pm
  • Side-note: regarding the API comment "For practical reasons, it is currently not allowed to have .. components in the path to the executable." It is still possible to pass the shell as the first ...
    SgbealSgbeal
    Feb 26, 2014 at 11:43 am
    Feb 26, 2014 at 11:43 am
  • This function takes the last comma or dot (if any) to make a clean float, ignoring thousand separator, currency or any other letter : function tofloat($num) { $dotPos = strrpos($num, '.'); $commaPos ...
    Brewal RenaultBrewal Renault
    Feb 26, 2014 at 9:25 am
    Feb 26, 2014 at 9:25 am
  • Note Submitter: vitalic#pisem.net ---- Split $string after each $pos, by $space Example: <?php spaceStr('1836254','-',3); ? Would return '183-625-4'; <?php function spaceStr($string,$space,$pos) { ...
    Philip OlsonPhilip Olson
    Feb 26, 2014 at 12:09 am
    Feb 26, 2014 at 12:09 am
  • Note Submitter: sam dot <span class="m_body_email_addr" title="2ca55da1c84f7780ea8ba71fc488ce99" braslavskiy@gmail.com</span ---- If you are trying to randomly generate an unique string (ID, file ...
    Philip OlsonPhilip Olson
    Feb 26, 2014 at 12:08 am
    Feb 26, 2014 at 12:08 am
  • Here is a simpler and a better presented ASCII list for the <32 or 127 filters (if wikipedia confused the hell out of you): http://www.danshort.com/ASCIImap/ ---- Server IP: 72.52.91.14 Probable ...
    David DrakulovskiDavid Drakulovski
    Feb 25, 2014 at 7:54 pm
    Feb 25, 2014 at 7:54 pm
  • I made this code for some useful filtering texts with lot of gibberish. Example provided: <?php $text = "There are;many|variations of:passages of Lorem Ipsum available,but the/majority ...
    David DrakulovskiDavid Drakulovski
    Feb 25, 2014 at 10:58 am
    Feb 25, 2014 at 10:58 am
  • You should prefer to use pg_query_params, i.e. use parameterized queries, rather than using pg_escape_string. Or use the newer PDO interface with its parameterized query support. If you must ...
    RingercRingerc
    Feb 25, 2014 at 7:55 am
    Feb 25, 2014 at 7:55 am
  • <?php function array_flip_into_subarray($input){ $output = array(); foreach ($input as $key= $values){ foreach ($values as $value){ $output[$value][] = $key; } } return $output; } ---- Server IP ...
    GrimdestripadorGrimdestripador
    Feb 25, 2014 at 12:06 am
    Feb 25, 2014 at 12:06 am
  • Note Submitter: rajaram ---- $query1 =Array ( [0] = Array ( [id] = 1 [role_id] = 1 [email] = <span class="m_body_email_addr" title="d2a1906e4c9b816eb2f920bbe48bd63b" admin@mybonfire.com</span ) [1] = ...
    LevimLevim
    Feb 24, 2014 at 10:57 pm
    Feb 24, 2014 at 10:57 pm
  • Note Submitter: toni dot garcia dot <span class="m_body_email_addr" title="f2d5c58dd4925cafb4dbddd3431fb87a" gutsens@gmail.com</span ---- Make a recursive search on array and return the matches ...
    LevimLevim
    Feb 24, 2014 at 10:41 pm
    Feb 24, 2014 at 10:41 pm
  • Note Submitter: <span class="m_body_email_addr" title="ead90405fcce2ee4a810e57d49363b07" aukunulala@gmail.com</span ---- hello I have a problem when change php.ini for browscap.ini ...... I used wamp ...
    LevimLevim
    Feb 24, 2014 at 5:30 pm
    Feb 24, 2014 at 5:30 pm
  • Here's an implementation that adheres to the PECL source quite strictly. This is useful for people who want to use it but don't have the extension, as well as for people who want to understand what ...
    LevimLevim
    Feb 24, 2014 at 5:15 pm
    Feb 24, 2014 at 5:15 pm
  • Note that this does not work within an exception handler. e.g. <?php function handler1(Exception $e) { echo "handler1\n"; restore_exception_handler(); throw $e; } function handler2(Exception $e) { ...
    Rl7Rl7
    Feb 24, 2014 at 10:57 am
    Feb 24, 2014 at 10:57 am
  • It's my __json_encode function to encode in JSON format array or string with javascript function <?php function __json_encode($mVar,$fnCallback="stripcslashes") { return preg_replace_callback( '#"[ ...
    Guillaume JonvilleGuillaume Jonville
    Feb 23, 2014 at 7:44 pm
    Feb 23, 2014 at 7:44 pm
  • I used Windows 2003 Server, IIS 6.0, MS SQL Server 2008, and PHP 5.3 along with FastCGI. If, after following the set up step-by-steps, you continually get a FastCGI 500 timeout error check your MS ...
    Pythonex12Pythonex12
    Feb 23, 2014 at 7:27 pm
    Feb 23, 2014 at 7:27 pm
  • There is a lack of precision for the second example : Example #2 Sorting multi-dimensional array The explanation is : "In this example, [...] The second will contain 1, 3, "2", 2, 1 (sorted as ...
    JcharpentierJcharpentier
    Feb 23, 2014 at 5:11 pm
    Feb 23, 2014 at 5:11 pm
  • Because MySQL does not currently support the use of cursors, the $cursor_offset feature cannot work when using PDO to access a MySQL database. If you are tring to arbitrarily access a specific record ...
    Lenz_kappovLenz_kappov
    Feb 23, 2014 at 10:30 am
    Feb 23, 2014 at 10:30 am
  • Following are the top 20 pages of the manual, sorted by the number of user notes contributed. These sections could use a polish, those notes represent 6.4% of the 23710 total user notes. Notes | Page ...
    PhpdocPhpdoc
    Feb 23, 2014 at 4:31 am
    Feb 23, 2014 at 4:31 am
  • Note that this extension *is* a high level implementation of POSIX threads, including on Windows (which is why pthreadsV*.dll is required) ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ...
    JasonrlesterJasonrlester
    Feb 23, 2014 at 12:09 am
    Feb 23, 2014 at 12:09 am
  • If you are looking for HTML beautifier (a tool to indent HTML output produced by your script), Tidy extension might not be the right tool for the job. First and foremost, you should not be using ...
    GkGk
    Feb 22, 2014 at 10:56 pm
    Feb 22, 2014 at 10:56 pm
  • @someone @thomas Decorating a finalized class is not possible. The decorator that's mentioned is incomplete. There's a fundamental flaw in it. Look: <?php //copy'n'paste your FooBar, Foo definition ...
    TT
    Feb 22, 2014 at 10:19 pm
    Feb 22, 2014 at 10:19 pm
  • Just a note for those who face problems on names containing spaces (e.g. "test test.pdf"). In the examples (99% of the time) you can find header('Content-Disposition: attachment ...
    RiksoftRiksoft
    Feb 21, 2014 at 6:04 pm
    Feb 21, 2014 at 6:04 pm
  • asdasdasd asdasdasdsad asdasdasdasd asdasdasdasd ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/function.getcwd.php Edit -- ...
    AsdAsd
    Feb 21, 2014 at 5:57 pm
    Feb 21, 2014 at 5:57 pm
  • actually client side will throw an exception when any of the servers is down or unreachable instead like Fatal error: Uncaught exception 'GearmanException' with message 'Failed to set exception ...
    Littlexiang521Littlexiang521
    Feb 21, 2014 at 8:01 am
    Feb 21, 2014 at 8:01 am
  • Note Submitter: <span class="m_body_email_addr" title="eeb017270305eab078716406fa8ab575" sftranna@yahoo.com</span ---- I would like to select strings from a table and return them as an array For ...
    Nuno LopesNuno Lopes
    Feb 20, 2014 at 10:19 pm
    Feb 20, 2014 at 10:19 pm
Group Navigation
period‹ prev | Feb 2014 | next ›
Group Overview
groupphp-notes @
categoriesphp
discussions125
posts257
users118
websitephp.net

118 users for February 2014

: 113 posts Levim: 74 posts Googleguy: 32 posts Philip Olson: 15 posts Nuno Lopes: 11 posts Phpdoc: 5 posts Mazzanet: 2 posts Rdlowrey: 2 posts Marco: 2 posts Manoj Monu23: 2 posts David Drakulovski: 2 posts Telefoontoestel: 2 posts Ahmad: 2 posts Ian_channing: 2 posts B G Dariush: 1 post Andrew: 1 post Tmnuwan12: 1 post T: 1 post Qschuler: 1 post Bombis: 1 post
show more
Archives