Skip to content

Instantly share code, notes, and snippets.

Helge Sverre HelgeSverre

Block or report user

Report or block HelgeSverre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View array.php
<?php
$anArray = [
"stuff" => "stuff",
"stuff2" => "stuff",
"stuff3" => "stuff",
"stuff4" => "stuff",
];
View pdf-conversion.php
<?php
/*
Assuming that all the data is the same "form", we can simply grab the data from the request
and render it as HTML, then convert that HTML doument to a PDF using the DomPDF library.
*/
// Grab the request data
$request = $_POST;
View download-zip.php
<?php
// imagine $imageIds is a get parameter with a comma seperated string of ID's
// Eample: http://localhost/download-zip?images=1,2,3,4
Route::get("/download-zip", function ($images) {
$imageIds = explode(",", $images);
// This is an eloquent model
@HelgeSverre
HelgeSverre / MY_Loader.php
Created Mar 27, 2015
Template loading function for CodeIgniter 3.x
View MY_Loader.php
<?php
/**
* Template loading function for CodeIgniter 3.x
* Location: application/core/MY_Loader.php
* Class MY_Loader
*/
class MY_Loader extends CI_Loader
{
You can’t perform that action at this time.