## COMBINE OF TWO ARRAYS INTO ONE ARRAY $PRO_QTY_ARR = array(); $TMP_M=0; $TMP_N=0; foreach($product_id_arr as $value) { $PRO_QTY_ARR[$TMP_M][‘P’] = $value; TMP_M++; } foreach($product_qty_arr as $q) …
Read MorePHP
Combine Of two arrays into two array
## Combine two array elements into one array $PRO_QTY_ARR = array_combine($product_id_arr,$product_qty_arr); foreach($PRO_QTY_ARR as $key => $value) { echo $key; echo $value; }
Read Moresearch in php
## Here multiple word search is tried.. Its working.. $data = array(); $data[‘search_list’] = “”; $data[‘total_search’] = “”; $data[‘search_on’] = “”; $data[‘search_words’] = “”; $_searchfield …
Read MoreBlock a div content from cut copy paste
<script> // BLOCK COPY CUT PASTE $(document).ready(function() { $(‘#shr14-p’).bind(“cut copy paste”, function(e) { e.preventDefault(); }); }); </script> <style> // USE CSS FOR NOT HIGHLIGHT .shr14-unselectable{ …
Read Morehow to implement search in codeigniter
$_searchfield = $_REQUEST[‘key’]; $_searchfield = str_replace(“‘”, “”, $_searchfield); $query = $this->db->query(“SELECT * FROM td_product WHERE active=1 AND product_code like ‘$_searchfield’ UNION SELECT * FROM td_product …
Read MoreCheck the field value Number or not in Javascript
<script type=”text/javascript”> numbersonly(myfield, e, dec) { var key; var keychar; if (window.event) { key = window.event.keyCode; } else if (e) { key = e.which; } …
Read MoreTab view design in html
# MAKING OF TAB VIEW DESIGN:: <style> .sh14-prohead { background-repeat: repeat-x; height: 20px; font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; font-weight: bold; font-size: 12px; padding: 5px; …
Read MoreHow to Join sql query in php
$SELECT = “c.city_id,c.city_title,c.state_id,cn.cnt_id as country_id”; $FROM = “td_city as c INNER JOIN td_states as s ON c.state_id=s.id INNER JOIN td_country as cn ON cn.cnt_id=s.country_id “; …
Read Moreexecute the code if check box is checked in jquery
## IF CHECK BOX CHECKED THEN ONE BLOCK EXECUTE THE CODE , OTHERWISE OTHER BLOCK WILL EXECUTE THE CODE. $(‘#checkbox-id’).change(function() { if(this.checked == true) …
Read Morehow to load differ image depending on screen width
<script> if (document.documentElement.clientWidth > 940) { document.write(‘<img class=”<?php echo “ligncenter size-full “.$imgInfo[$randno][id];?>” src=”<?php echo $imgInfo[$randno][src];?>” title=”<?php echo $imgInfo[$randno][title];?>” alt=”<?php echo $imgInfo[$randno][alt];?>” />’); } </script>
Read More