Skip to content

Instantly share code, notes, and snippets.

View thephpx's full-sized avatar
🏠
Working from home

faisal ahmed thephpx

🏠
Working from home
View GitHub Profile
@thephpx
thephpx / simple_dom_parser_code
Created August 2, 2012 11:07
sample code for simple dom parser in codeigniter
$this->load->library('simple_html_dom');
$raw = file_get_html('http://faisalbd.com');
foreach($raw->find('a') as $element){
echo $element->href . '<br>';
}
@thephpx
thephpx / ci_breadcrumb_helper.php
Created July 13, 2012 01:48
CodeIgniter breadcrumb generator from URI
if(!function_exists('create_breadcrumb')){
function create_breadcrumb(){
$ci = &get_instance();
$i=1;
$uri = $ci->uri->segment($i);
$link = '<ul>';
while($uri != ''){
$prep_link = '';
for($j=1; $j<=$i;$j++){