PHP code example of carlesjove / a

1. Go to this page and download the library: Download carlesjove/a library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

carlesjove / a example snippets


<!DOCTYPE html>
<html dir="ltr" lang="en">
  <head>
    <meta charset="utf-8">
    <title>My Site</title>
    <link rel="stylesheet" type="text/css" href="/assets/css/example.css">
  </head>
  <body>
    <header>
      <h1>My Site</h1>
      <nav>
        <ul>
          <li><a href=" echo $this->nav('my-page'); 

// data/posts.php
// The array must be named $list
$list = array(
  'first-post' => array(
    'title' => 'My first post',
    'body'  => 'A very long post'
  ),
  'second-post' => array(
    'title' => 'My second post',
    'body'  => 'A very long post'
  )
);

// posts_[id].php
// We get the post data in $item
<h1> echo $item['title']; 

<!-- Make sure current language will be on the navigation links or in lists' links, using nav() -->
<a href=" echo $this->nav('my-page'); 
 $this->content();