Posts by OriginalEXE

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says


I doubt devs will disclose the exact information because that would allow authors to game the system.
And would that be a bad thing? If the authors get more exposure that they get more sales, more sales means more money for the author and for the envato TOO. So why not be clear about this.

How do you get more exposure if every author starts doing the same optimization?

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

I doubt devs will disclose the exact information because that would allow authors to game the system.

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says
https://github.com/OriginalEXE

Not much to see, mostly working on private repos.

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

Second loop basically goes through your array and gives you access to every pair in your array.

You have this:
array(
'lettuce' => 'with',
'tomato' => 'without',
'onions'  => 'with'
);
foreach ( $salad as $ingredient => $include ) {}
basically means: go through each pair in my array, put left side (lettuce, tomato, onions) into variable $ingredient, and right side (with, without) into variable $include.

Code loops through each pair, and you can do with array values whatever you need.

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

That signature :D

Congrats!

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

You can achieve same result in a multitude of ways in every language.

The question you need to ask yourself is, which way is easiest for maintenance and possible future expanding.

Classes are a great way of structuring your data, but you will learn that with experience.

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

You have to include it before echoing the $code.

Before including it, your domain is undefined and echoing will throw error.

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

Yes, it does.

You have public, private and protected.

  • public – can be accessed from anywhere.
  • private – can be accessed only from within a class
  • protected – can be accessed from within a class and classes extended from it
So if you were to declare $age like this:
private $age;
this would not work:
echo $student->age;

because you call it outside of the class.

1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says
Noticed one more mistake, you have this:
public function __constructor
change to this:
public function __construct
1465 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says
Change:
public function greet() {
    return "Hello, my name is " . $firstname->firstname . " " . $lastname->lastname . ". Nice to meet you! :-)";
}

to this:

public function greet() {
    return "Hello, my name is " . $this->firstname . " " . $this->lastname . ". Nice to meet you! :-)";
}
and this:
public function __constructor($firstname, $lastname, $age) {

    $firstname->firstname = $firstname;
    $lastname->lastname = $lastname;
    $age->age = $age;

}

to this:

public function __constructor($firstname, $lastname, $age) {

    $this->firstname = $firstname;
    $this->lastname = $lastname;
    $this->age = $age;

}

$this represents our object and you can use it inside that object method to access other methods and properties.

by
by
by
by
by
by