Codeigniter 2.1 – Routing

I am a bit new to the routing with CI, and I don’t understand it quite well (to be honest not at all). I have following url which need to be changed: number)

It is used for pagination, and I need it to be shorten to:

I tried:

$route['mali_oglasi/index/(:num)'] = ‘mali_oglasi’;

but it doesn’t seems to work(nothing is [...]

arrange checkbox values in two columns

I have a form with check box values i want to arrange the checkbox in two columns instead of
one single long column.
How can i split it to two columns ?
Here is the code :
<form id=”form” name=”form” method=”post” action=”">

<table width=”502″ border=”0″>
Name :
<input type=”textbox” name=”rcv_group_name” value=”">
<input type=”hidden” name=”add” value=”add” />


<td align=”left”>

<?php [...]

fancybox to show up only the first time when page land on

How to install fancybox to show up only the first time when you com to a home page.
This shall be included:
<h1> Please select your language </h1>
<div> class=”select-language” </div>

The fancybox shall show up only once, regardless which page you land on.

Trace type of error mySql PDO php

I would like to trace the type of error that occurred while executing a query using PDO prepare and execute.
For example, if I had to insert email, Name, DOB, with the email requiring to be unique, instead of writing a special query to check if Email is already taken, I would like to trace the [...]

how to get rand same array in php

what i want to do is something like memory game, but I keep cannot get the same number with the out put
$numbers = range(1, 15);
foreach($numbers as $key){
echo $numbers[array_rand($numbers)];

now the out put will be something like this
4 2 3 3

1 5 3 6

2 3 4 5

10 9 8 10

but how to I do it [...]

Disable a drop down menu if a certain value is selected upon editing form

I want to disable the drop down menu when a user edits a form and the selected value of drop down menu is “1″
This is what I currently have, when user clicks “submit” it will check if the selected value is “1″ then it will pop up an alert box. What I wish to do [...]

Why is that I only get 10 data from Amazon Web Services API

My problem is that I only get 10 data from amazon and it is expected to be 100 since it is the limit of the AWS, am I missing something? I need help please thanks
——————–Here’s my code as of now:——————–
//header(“Content-type: text/xml”);
header(“Content-type: application/json”);
function awsRequest($searchIndex, $keywords, $responseGroup = “Large”, $operation = “ItemSearch”, $pageNumber [...]

VirusTotal service API always returns response code 1

I am trying to scan URLs with VirusTotal service API but always receive response_code = 1 even if URL don’t exists:
stdClass Object
[permalink] =>
[resource] =>
[url] =>
[response_code] => 1
[scan_date] => 2012-09-26 08:49:45

how do i write a CSS for mouse hover

<div id=”he”>
<div id=”header”>
<div class=”headertabs”>
<ul class=”nav”>
<li class=”divide”>&nbsp;</li>

How to Replace HTML data using array based pattern in php?

We are working on a project, in which we have to replace HTML text, array based pattern.
Please look at the codes
PHP Code

$html = new simple_html_dom();
$html = $html->getElementByTagName(‘body’) ;
function wp_strip_all_tags($string, $remove_breaks = false) {
$string = preg_replace( ‘/<script\b[^>]*>(.*?)<\/script>/is’,”, $string );
$string = preg_replace( ‘/<style\b[^>]*>(.*?)<\/style>/is’,”, $string );
$string = strip_tags($string);

if ( $remove_breaks )
$string = preg_replace(‘/[rnt ]+/’, ‘ ‘, [...]

Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.